Suraj Kaushik's Blog

2 share my mistakes and lessons

Results of Experiments and Implementaiton

error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level

Error    141    It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.    D:\developers\Suraj\projects\dunecorporation\new\new\StraightRootMkt\StraightRootMkt\StraightRootMkt\Web.config    43 this kind of error can be removed by altering the below code: <configuration>   <configSections>     <sectionGroup name=”system.web.extensions” type=”System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, [...]

, , ,

Compiler Error Message: CS0161: ‘users.login(string, string)’: not all code paths return a value

Not All code paths retun a value. comes when we set any function to return any kind of datatype value other than void as Line 25:     public string login(string userid, string pwd) above funciton must return string value in every case, no matter if it returns a blank string. Hence, if you din’t check every [...]

, , ,

The name ‘SqlHelper’ does not exist in the current context

Compiler Error Message: CS0103: The name ‘SqlHelper’ does not exist in the current context current context type error come in existence if we forget to include namepace for function/ object we are using on that particular file. OR else if you created some custom class then be sure that class is in your application scope. [...]

, ,

How to solve A potentially dangerous Request.Form value was detected from the client

This kind of problem can come in existance when a form is submitted to server. I faced the problem during migration of Classical ASP Website to C# ASP.NET / MSSQL SERVER website. I hope It will work with all the ASP.NET Websites.  A potentially dangerous Request.Form value was detected from the client This kind of [...]

, , , , , , , ,