• 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"?>

<configuration>

	<connectionStrings>
		<!--<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" />

	</connectionStrings>


	<location path="PL/Quiz">

		<system.web>
			<customErrors mode="Off"/>
		</system.web>

		<system.web>

			<authorization>

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

			</authorization>

		</system.web>

	</location>

	<system.webServer>

		<defaultDocument>
			<files>
				<clear />
				<add value="Home.aspx" />
			</files>
		</defaultDocument>
	</system.webServer>



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


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

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

	</system.web>


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

Open in new window

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

http://support.microsoft.com/kb/823379
0
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
0
 
Paulmc999Commented:
Just a question from me I am afraid.

Is "PL/Quiz" a real directory or you are using URL routing?
0
 
mmalik15Author Commented:
Thank you. your comment gave me a tip to solve the issue
0
 
Paulmc999Commented:
Thanks M8 but please share the solution for the benefit of others who have the same problem.
0
 
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.
0
 
mmalik15Author Commented:
changed <location path="PL/Quiz"> to <location path="Quiz"> and it worked fine :)
0
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