Last post Sep 13, 2010 10:11 AM by dariune
Sep 11, 2010 10:39 AM|dariune|LINK
I have been building a site and it works fine locally but i get a 404 and it redirects to the generic error page when i upload it to FastHosts.
I contacted them and they say they think its a scripting error on my part.I dont even know where to look because ive not got any indication as to what could be the problem.
If any of you could help i would be very grateful.
The web.config looks like this ...
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
<add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\OakmanDesign.mdf;Integrated Security=True;User Instance=True"
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
<compilation debug="false" targetFramework="4.0">
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
<pages theme="MainTheme" styleSheetTheme="MainTheme" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
If you need any more information, let me know and i will happily provide it.
Thanks in advance
Sep 11, 2010 01:56 PM|sanjibsinha|LINK
In web.config, customerrors part, you may try to get the mode on and see what happens:
<customErrors defaultRedirect="ErrorPage.aspx" mode="On">
<error statusCode="500" redirect="servererror.aspx" />
<error statusCode="404" redirect="filenotfound.aspx" />
<error statusCode="403" redirect="AccessDenied.aspx" />
404 error when uploaded
Sep 11, 2010 02:04 PM|SparTodd|LINK
Is it the default home page or some other page that is causing the error? If you're having problems with the home page, check in IIS to see if Enable Default Content is selected and take a look at the documents listed for default content. Edit the list
if the name of your home page isn't included, and move it to the top of the list.
Sep 11, 2010 02:46 PM|HostingASPNet|LINK
How did you deploy your ASP.NET site? Also it seems that you use ASP.NET 4.0, but FastHosts support ASP.NET 3.5 with their
shared Windows hosting plans.
Sep 11, 2010 03:38 PM|dariune|LINK
It brings up the servererror.aspx when i add the error 500 message.
@SparTodd - Its on a remote host so i dont have direct access to their IIS (The site works fine locally)
Im pretty sure thats the problem is that im using 4. However when i try to change it to 3.5 i get all kinds of problems and the site stops working locally.
Sep 11, 2010 11:59 PM|dariune|LINK
Ok i have got it partly solved. I changed the site to 3.5 and, due to the host not supporting HttpHandlers or modules in the web.config i removed them and the pages work.
However my next problem is that i built the site in VS 2010 and to create a database in that is to create an mdf file (or at least thats the only way i know how to do it) but my host doesnt support MDF files.
So i have to create a SQL database. I have created the MDF file but im not sure how to set up SQL server on my machine and more importantly how to import the data from the MDF file into a SQL database so i can put that onto my site.
Is anyone able to help me with that?
Sorry for all the questions
Sep 13, 2010 02:13 AM|kctt|LINK
Open Management Studio, attach mdf file to a database.
If godaddy provide database restore tool in their control panel, backup your database (.bak file) and restore to hosting server.
You can also request the host to attach mdf file for you to a MSSQL database.
Sep 13, 2010 10:11 AM|dariune|LINK
Im actually using FastHosts (did i mention goDaddy because i am dealing with them with another site)
Thankyou all for your replies, i have managed to resolve the issue.
I apreciate the time people took to help me.