• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 531
  • Last Modified:

how to fix "Server Error in '/' Application" on webserver

I have developed my web application using asp.net c# version 4.0 and hosted it on Godaddy.com webserver as a shared hosting. All the pages are loading fine from the server (including pages which access database)except the pages which need Forms Authentication.  I have a directory of pages (called Quiz) which are only accessible by the authorised users. But when the user's after login try to access it they get runtime .net error page. The application runs perfectly on my local IIS 7.0. I have customerrors mode="off" but cant view the detailed error. My web.config is attached and appreciate any comments
<?xml version="1.0"?>


		<!--<add name="DatatClassesConnectionString" connectionString="Data Source=CHLP0120\MSSQL;Initial Catalog=LifeInTheUK;Integrated Security=True" providerName="System.Data.SqlClient" />-->
		<add name="DatatClassesConnectionString" connectionString="Data Source=lifeintheuk.db.8452835.hostedresource.com;Initial Catalog=lifeintheuk;User ID=lifeintheuk;Password=xxxxxxxxxxxxx"  providerName="System.Data.SqlClient" />


	<location path="PL/Quiz">

			<customErrors mode="Off"/>



				<allow users="user"/>
				<deny users="*"/>





				<clear />
				<add value="Home.aspx" />

		<authentication mode="Forms">
			<forms path="/" loginUrl="~/Login.aspx" protection="All" timeout="5"/>

		<sessionState mode="InProc" cookieless="false" timeout="30"/>

		<compilation debug="true" targetFramework="4.0">
				<add assembly="System.Data.Linq, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
				<add assembly="System.Design, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
				<add assembly="System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
				<add assembly="System.Speech, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
		<pages maintainScrollPositionOnPostBack="True" enableEventValidation="true" />
			<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />


		<validation validateIntegratedModeConfiguration="false" />
			<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />

Open in new window

1 Solution
does the show friendly errors in the advanced options of the browser is selected?
Should the path be a relative rather than an absolute address?
Kiran SonawaneProject LeadCommented:
You may need to register framework with IIS i.e. aspnet_regiis

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

mmalik15Author Commented:
yeah browser.xul.error_pages.enabled;true
and the paths are relative. When i get the error I can see the correct path in the browser.
Try to access this http://www.practicelifeintheuktest.co.uk/Quiz/UserProfile.aspx, this page is for only logged in users and when you click on above it should re direct you to login.aspx but its not and rather giving that error
Just a question from me I am afraid.

Is "PL/Quiz" a real directory or you are using URL routing?
mmalik15Author Commented:
Thank you. your comment gave me a tip to solve the issue
Thanks M8 but please share the solution for the benefit of others who have the same problem.
mmalik15Author Commented:
Actually I had the directory Quiz inside a parent directory PL but at some point moved it to root directory whereas in my web.config i forgot to change the path.
mmalik15Author Commented:
changed <location path="PL/Quiz"> to <location path="Quiz"> and it worked fine :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now