Questions tagged [system.web]

System.Web is a namespace of the .NET framework. It supplies classes and interfaces that enable browser-server communication.

System.Web is a namespace of the .NET framework. It supplies classes and interfaces that enable browser-server communication.

References

168 questions
2
votes
5 answers

Httputility.urldecode replacement in .Net4?

I got an old Program(class library) developed by .Net 2. Recently I want to use that Program in new project which is use .Net4(For new WPF feature's ). so there is a big problem: .Net4 don't support System.Web and as result it can't be use…
Rev
  • 2,269
  • 8
  • 45
  • 75
2
votes
5 answers

Get Windows Username in ASP.NET without System.Web

I have a reporting dll that is used in ASP.NET (Windows Authentication) and winforms projects. Sometimes it needs the username so if it was running in ASP.NET it would use: System.Web.HttpContext.Current.User.Identity.Name; and in…
PeteT
  • 18,754
  • 26
  • 95
  • 132
2
votes
1 answer

ASP.NET MVC / Get raw value from query string

How can I get the raw value corresponding to a parameter from a query string in ASP.NET MVC (5.2.7) ? Currently, I am only able to get the decoded value. For example, with the query string p=lol%20cat, the code below returns "lol cat" : string…
2
votes
4 answers

How do I deserialize JSON correctly in C#

I am trying to deserialize the Supreme New York JSON but I am getting an error. I used json2csharp.com to convert the Json into classes. Then I summarised them all into one called items namespace SUPBOTTESTING { public class items { …
Ahmed Soliman
  • 45
  • 1
  • 6
2
votes
2 answers

System.Web.Hosting not found in VS2008

I am trying to make a Cassini-like server for a particular asp.net web application. The Client is not happy with the Cassini interface, so I am just expanding the Cassini code, adding new features, and providing a fresh look to the UI. Now the…
Ubaid
  • 269
  • 1
  • 4
  • 15
2
votes
1 answer

How is the default Culture and UICulture determined?

The InitializeCulture() method can be overridden and you can easily choose your own Page.Culture and Page.UICulture. You can also add a globalization section in the Web.config or set the culture in your BasePage. But how are the default values of…
Thomas Mulder
  • 740
  • 10
  • 26
2
votes
2 answers

Can I detect if SSL/https is enabled for an ASP.NET website from within the site's code?

I'm working on a CMS that can run either with or without https enabled on the webserver. I'd like to be able to detect whether https is enabled or not, so that I can act accordingly (for example, display some https-related options to the…
Stuart
  • 1,868
  • 2
  • 14
  • 14
2
votes
0 answers

Could not load assembly 'System.Web in Xamarin.Android

I've just load a additional project to my Xamarin.Android project. After add reference i get this error? What is the problem? Severity Code Description Project File Line Suppression State Error Exception while loading assemblies: …
bigjoe1
  • 117
  • 1
  • 12
2
votes
0 answers

HttpUtility.UrlDecode is replacing + with space

I am trying to decode a Microsoft Identity Register Email token with HttpUtility.UrlDecode in Asp.net WebApi controller. I observed that this method is replacing + characters with space. e.g…
Venkata Dorisala
  • 4,783
  • 7
  • 49
  • 90
2
votes
0 answers

Call to System.Web.HttpUtility.HtmlDecode throws StackOverflowException

I have inherited some code where a call like: var test = HttpUtility.HtmlDecode("google"); causes a stackoverflow. A call to WebUtility.HtmlDecode in the same place works fine. I've Googled around but not found anything about why this might be…
Alan
  • 79
  • 4
2
votes
3 answers

asp.Net MVC How to set colors to each bar in chart?

I am using System.Web.Helpers in a MVC application. The application creates multiple charts and after many attempts I finaly made it work. foreach (var m in model[0].HistoryValues) { var chart = new Chart(width: 600, height: 400) …
ThunD3eR
  • 3,216
  • 5
  • 50
  • 94
2
votes
1 answer

Add System.Web Reference To A Windows 10 Universal App

I download a project on Gitgub Basically is a Console Application. But I want to translate this C# Console Application to a Universal Windows App. I want to use HttpUtility.UrlEncode in a windows 10 universal, but I can not find System.Web in .NET…
2
votes
3 answers

Where can I find System.Web.HttpContext.Current.Server dll?

Where can I find System.Web.HttpContext.Current.Server dll. I want to use Server.MapPath() in my code and it requires System.Web.HttpContext.Current.Server namespace. Even from references I couldn't find and add System.Web.HttpContext.Current.Server…
Sivakumar Piratheeban
  • 493
  • 4
  • 11
  • 39
2
votes
1 answer

Mod_Mono + ASP MVC 5 Framework 4.5 - System.Web.Security.MembershipPasswordAttribute Error

Good day. Try run asp mvc on mod_mono. It seems ok, but when i try go to login page see 500 internal error: System.TypeLoadException Could not load type 'System.Web.Security.MembershipPasswordAttribute' from assembly 'System.Web,…
foolsoft
  • 147
  • 6
2
votes
3 answers

Importing System.Web.Script.Serialization in Xamarin

I wanted to use JavaScriptSerializer.Deserialize to convert a JSON array string to a list of objects. But this class uses the the System.Web.Script.Serialization in Xamarin namespace. So I wanted to import the System.Web assembly in my project to…
Code Pope
  • 5,075
  • 8
  • 26
  • 68