Web hosting blog
+ Updates | follow the latest releases of applications
+ Promotions | find our periodical offers and discounts
+ Articles | get advice and tips from our professionals
Troubleshooting .NET websites
The .NET framework is a powerful technology that allows you to access a large library of pre-coded solutions to common programming issues. This allows you to create complex websites with relative ease. The more complex the website the more difficult it can be to identify a specific error. This guide will explain some of the most common errors and how to generate a precise error message if you do come across any problems.
Server Error in “/” ApplicationThis is a standard .net error message and is not enough information to diagnose what the error may actually be, however .NET has been designed to provide useful error messages. To diagnose a problem with a .NET website, the first step is to gather accurate information regarding the error. These informative error messages can be displayed, by simply turning off custom errors in your web.config file.
The easiest way of displaying complete error messages is to rename your existing web.config file, then upload a new web.config file with the following content.
This will show you the actual error message displayed, and should provide you with enough information to diagnose the fault. If you would like more information regarding the fault, you can edit the page that is generating the error.
The top line of the page should be similar to the following:
< %@ Page Language=”VB” %> or < %@ Page Language=”C#” %>
There may be additional content within your line of code, but by adding debug=”true” trace=”true” you will see as much error and debug information as possible.
For example: < %@Page Language=”VB” debug=”true” trace=”true” %>
P.S.: You will not need to recompile your application as the code itself is not being altered, this change just instructs ASP.NET to output more information.
From the information provided you should have enough information to locate the source of the error and resolve the issue. If the error appears to be server related please contact us, providing the full error messages and debug information you are receiving so that we can investigate the issue straight away.
My Custom/Third party DLL will not workI receive the following errors:
Security Exception Description: The application attempted to perform an operation not allowed by the security policy.
or Error: “The current trust level does not allow use of the attribute”.
To protect the integrity of our customers data and our network as a whole we have certain restrictions on our shared hosting environment. As such, certain third party DLL’s and DLL’s requiring full trust levels will not operate on our shared platform.
You should check whether your third party DLL has a version available that supports partial trusted callers. If you receive this error when running your own dll’s you should ensure that the AssemblyInfo (eg AssemblyInfo.cs for c#) file has the following before your project is compiled:
[assembly:AllowPartiallyTrustedCallers]
We are unable to provide additional services on our shared hosting platform, if you wish to use an unsupported DLL, or need to run a DLL with full trust level you should consider a dedicated server, where you have full control over the configuration of your hosted .NET platform.
My web.config file is not workingThe web.config file is a settings and configuration file for .NET web applications. This should be located within the htdocs folder of your webspace. While sub directories may also contain a web.config file to provide configuration specific to that particular directory, a master web.config file must also be placed directly in the htdocs folder of your webspace.
More information on the configuration of the web.config file can be found in the following Microsoft articles:
Web.config configuration: http://msdn.microsoft.com/en-us/library/aa719558.aspx.
Hierarchical Configuration Architecture: http://msdn.microsoft.com/en-us/library/aa720128(VS.71).aspx.
Format of ASP.NET Configuration Files: http://msdn.microsoft.com/en-us/library/ackhksh7(VS.71).aspx.
My scripts in the ‘bin’ directory do not executeWhile scripts will execute correctly in most folders within your webspace, the Bin folder in an exception. When you create a bin folder it is automatically configured with special permissions and behavior to store .NET assembly files (compiled DLL’s).
Quick Tip: This directory should not be confused with the cgi-bin directory which is set up by default within your htdocs folder.
All scripts placed in a directory called bin in htdocs will fail to execute. You should either move the files to another folder and remove the folder, or rename the folder.
Troubleshooting .NET websites « Web hosting blog | webhost-reviewer.com (May 12, 2009)
[...] Original post: Troubleshooting .NET websites « Web hosting blog [...]
Troubleshooting .NET websites « Web hosting blog | hostingrefugee.com (May 12, 2009)
[...] Here is the original post: Troubleshooting .NET websites « Web hosting blog [...]
Troubleshooting .NET websites « Web hosting blog « pickyourhost.info (May 12, 2009)
[...] Go here to read the rest: Troubleshooting .NET websites « Web hosting blog [...]
Topics about Domains » Archive » Troubleshooting .NET websites « Web hosting blog (May 13, 2009)
[...] Hussein Mahran created an interesting post today on Troubleshooting .NET websites « Web hosting blogHere’s a short outlineWeb hosting blog. + Updates | follow the latest releases of applications. + Promotions | find our periodical offers and discounts. + Articles | get advice and tips from our professionals … [...]
Post your comment:
You must be logged in to post a comment.
