Enabling ASP.NET Remote Error Messages
You receive a generic "Server Error in '/' Application". This error message is the .NET framework's default runtime error page and is in place for security reasons; preventing users from seeing the internals of your websites code.
When you have no remote desktop access to the machine hosting your website (this applies to most shared hosting accounts) you need to enable remote error message to help you get to the underlying cause of the error.
As the error message describes - you need to enable the <customErrors /> element within your web.config file.
- Open up your Web.Config file using your favourite text editor
- Locate the <system.web/> element
- Add the following code inside the <system.web/> element:
Code:<customErrors mode="Off"/>- You will now receive a detailed error message:
- Important! Remember to disable remote errors when you are done
ASP.NET with SQL Server Express Edition Databases
So you've created your awesome website in Visual Studio/Visual Web Developer - added a database to your App_Data folder. Everything's working on your local machine and it's time to go live. You upload your website and you get a server error.
This is most likely because you have configured your ASP.NET website/application to use the ASP.NET membership provider using Forms authentication.
Visual Studio/Visual Web Developer usually creates a SQL Server Express Database when you add any login controls; this database is designed to hold your user's data and usually resides in a folder called "App_Data", containing files with the extensions .MDF and .LDF.
In short, on a production web server (the computer that hosts your website on the internet) there are more stringent security controls in place. These security mechanisms prevent these two files (which form a database) from attaching to the SQL Server running on the machine.
To get your website working on our windows plesk hosting plans, you need to do the following:
- Create a blank database in Plesk, creating a username/password for that database as well
- Download Microsoft SQL Server Management Studio Express and install to your local machine
- Run Microsoft SQL Server Management Studio Express and connect to the default connection
- Make a backup of your database and upload to your web space
- Contact our friendly support team at support[at]freewhosting[dot]com requesting your backup to be restored to your empty database (providing the location of your backup file)
- Update your connection string within your Web.Config file to:
Replacing DB_Name, DB_User and DB_Password with the respective values.Code:<connectionStrings> <add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=DB_Name;User ID=DB_User;Password=DB_Password" providerName="System.Data.SqlClient"/> </connectionStrings>






Bookmarks