.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 25th, 2003, 02:00 AM
Cptn_Spoon Cptn_Spoon is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 8 Cptn_Spoon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 28 m 37 sec
Reputation Power: 0
Angry Web.Config login path error (forms authentication)

I am developing several hernias over the following problem
--------------------

I have started to upload a piece of a web app (ASP.NET and C#) which worked FINE on my localhost server. I am using Forms Authentication linked to an accessDB (i know i know....access...but its part of the specs) and it was working fine locally. Now it is uploaded to where it is being hosted (www.netpublisher.com) it has started to screw up. Whenever i try to access a protected page (and am not logged in) the UserLogin.aspx page is called from the wrong directory...

It should call it from the /UserLogin.aspx directory but since i tried to access a page in the protected folder it tries to open /Protected/UserLogin.aspx (which of course doesnt exist)

The VERY partially uploaded website is over at Small Business Press and just click on the User Login page on the side menu to get the error.

Please give me any help you can, im new to .NET and this is really p*ssing me off.

Cheers!

-Mal

WEB.CONFIG FILE
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
	<system.web>
		<compilation defaultLanguage="c#" debug="true" />
		<customErrors mode="Off" />
		  <authentication mode="Forms">
               <forms loginUrl="UserLogin.aspx" timeout="30"> <!--path="/"-->
               <!-- <forms loginUrl="http://www.smallbusinesspress.net/UserLogin.aspx">
               -->
               </forms>
          </authentication>
          <authorization>
               <allow users="?" />
          </authorization>
		<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
		<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="20" />
		<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
	</system.web>
	
	<location path="protected">
		<system.web>
			<authorization>
				<deny users="?" />
			</authorization>
		</system.web>
	</location>
	
</configuration>

Reply With Quote
  #2  
Old October 25th, 2003, 09:43 PM
Cptn_Spoon Cptn_Spoon is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 8 Cptn_Spoon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 28 m 37 sec
Reputation Power: 0
Talking

its ok, i figured it out.

i didnt know you could use the relative path mapping in the web.config file "~/"

for all those who have this same problem, anything run serverside in asp.net picks up the "~" key as the AppPath directory string, so if you ever need to relatively access your root directory (like from user controls or something) as long as the object is runat="server" then the ~/ will work.


Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > Web.Config login path error (forms authentication)

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap