Thursday, April 24, 2008

The type or namespace name 'Transactions' doesnot exist in the namespace 'System'




The type or namespace name 'Transactions' doesnot exist in the namespace 'System' (are you missing an assembly reference



Cause : You are missing a DLL.

Solution : This can be added by adding reference by right clicking in the solution in the Visual studio IDE. After adding this one, you can see the change in the Web.config file. You will see a new assembly been added there..


















Tuesday, April 22, 2008

sys.WebForms.PageRequestManagerParserErrorException:

sys.WebForms.PageRequestManagerParserErrorException: The message receieved from server could not be parsed. Common causes for this error are when the response is modified by calls to Response filters, HttpModules, or server trace is enabled.

There are a couple of solutions available to this error:
Try to put yur Sumbit button out of the Update Panel.

do not use the HttpModule and rely on IIS compression, or move the application to the .NET Framework 3.5.
Remove the HttpModule from web.config
Assure ScriptResource is not compressed:
Open the IIS Manager
Right click on "Web Sites" folder > Properties
Click the "Services" tab
Check "Compress application files" and "Compress static files"
Apply and confirm all dialogs
Stop IIS
Open a command prompt and go to C:\Inetpub\AdminScripts
Run the following commands to add .js, .aspx and .axd to the compression list:
cscript adsutil.vbs set W3SVC/Filters/Compression/GZIP/HcFileExtensions "htm" "html" "txt" "js"
cscript adsutil.vbs set W3SVC/Filters/Compression/Deflate/HcFileExtensions "htm" "html" "txt" "js"
cscript adsutil.vbs set W3SVC/Filters/Compression/GZIP/HcScriptFileExtensions "asp" "dll" "exe" "aspx"
cscript adsutil.vbs set W3SVC/Filters/Compression/Deflate/HcScriptFileExtensions "asp" "dll" "exe" "aspx"
Restart IIS
You can also move the application to .NET Framework 3.5 instead, because the UpdatePanel control has been changed internally and now this problem should not happen anymore.

Monday, April 14, 2008

The Name 'Request' does not exist in the current context

Nothing to worry about, since you can still access these properties, but using a different path.For example to access a cookie with the name MyCookie you would normally use Request.Cookies["MyCookie"]; however, if the error The name 'Request' does not exist in the current context is returned, use the following path for retrieving the cookie:
System.Web.HttpContext.Current.Request.Cookies["MyCookie"].value;

Friday, April 4, 2008

Difference between the Web.config of a ASP.Net Website and an ASP.NET AJAX Enabled Website

When you create a new AJAX-enabled Web site, you can use the Web.config file provided in the installation package to add the required configuration settings. In Visual Studio, the Web.config file for Microsoft ASP.NET AJAX is included in your project when you create a new ASP.NET AJAX-enabled Web Site. But in a Normal ASP.Net Ajax website, you need to add it manually by right clicking on the Website in the Solution explorer.

Adding ASP.NET AJAX Configuration Elements to an Existing Web Site
In an existing Web site, you typically have values in the Web.config file that you want to retain. In that case, you can add the new ASP.NET AJAX elements into the existing Web.config file.
The new elements are part of the following configuration sections:
The element
The element
The element
The element
The element
The element
The element