[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2011-10-11
9
Medium Priority
?
522 Views
Last Modified: 2012-05-12
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
Comment
Question by:mmalik15
9 Comments
 
LVL 15

Expert Comment

by:Eyal
ID: 36947698
does the show friendly errors in the advanced options of the browser is selected?
0
 
LVL 2

Expert Comment

by:Paulmc999
ID: 36947732
Should the path be a relative rather than an absolute address?
0
 
LVL 17

Expert Comment

by:sonawanekiran
ID: 36947780
You may need to register framework with IIS i.e. aspnet_regiis

http://support.microsoft.com/kb/823379
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mmalik15
ID: 36947796
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
 
LVL 2

Accepted Solution

by:
Paulmc999 earned 2000 total points
ID: 36948575
Just a question from me I am afraid.

Is "PL/Quiz" a real directory or you are using URL routing?
0
 

Author Closing Comment

by:mmalik15
ID: 36948863
Thank you. your comment gave me a tip to solve the issue
0
 
LVL 2

Expert Comment

by:Paulmc999
ID: 36948881
Thanks M8 but please share the solution for the benefit of others who have the same problem.
0
 

Author Comment

by:mmalik15
ID: 36948891
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
 

Author Comment

by:mmalik15
ID: 36948898
changed <location path="PL/Quiz"> to <location path="Quiz"> and it worked fine :)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Screencast - Getting to Know the Pipeline
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question