Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 19th, 2004, 10:00 AM
Authorized User
 
Join Date: Nov 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default connect to <computer>

Hi to all,

I have 3 asp.net pages (default.aspx, login.aspx, registro.aspx). And I configured the web.config to jump automatically to login.aspx when the user is not authentificated (forms authentification). There's no problem with this. But, when I link registro.aspx (using server.transfer or response.redirect), in order to input all data for registering the user, and I press a button in this page (with or without code in the onclick event) the "connect to <computer>" standard dialog from windows appears. I've tried this in two computers under Windows XP.

The point is that what I want is to register the user and authentify when the button is pressed, and then back to default.aspx.


-------------------------------
World only exists into your mind.
 
Old January 19th, 2004, 10:39 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Your registration page needs to be set up to not require authentication. One way of doing this is to create a subdirectory for "public" pages. In there, you can make a mini web.config file that contains only an authorization node so you can allow all users.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.web>
        <authorization>
            <allow users="*" />
        </authorization>
    </system.web>
</configuration>

This will permit access to the registration page.

I believe there is a way to do this on a page by page basis (instead of using a whole directory) but I have yet to figure out how to do that. I posted a question about it, but never got any responses.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old January 19th, 2004, 12:09 PM
Authorized User
 
Join Date: Nov 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Default

:)
Thank you. It works, but I don't understand the reason for this error, because it is produced when I press a button with no code inside.

-------------------------------
World only exists into your mind.
 
Old January 19th, 2004, 03:12 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

That problems is that you are changing the page you are looking at. When the server attempts to serve up this page, it's not authenticated. The error you are seeing seems strange to me. Usually you would just get directed back to the login page.

Peter
------------------------------------------------------
Work smarter, not harder.
 
Old January 20th, 2004, 09:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Quote:
quote:Originally posted by planoie
 I posted a question about it, but never got any responses.

Peter
------------------------------------------------------
Work smarter, not harder.
I must have missed your post.

<configuration>
 <system.web>
  <authentication mode="Forms" />
 </system.web>

 <location path="secret.aspx">
 <system.web>
  <authorization>
   <deny users="*" />
  </authorization>
 </system.web>
 </location>
</configuration>






Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 8: <asp:image> inside <a> & ext.CSS (pg. 274) epc BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 July 12th, 2008 04:37 AM
create <ul> with alternating class on <li> element Brian Campbell XSLT 2 November 3rd, 2006 06:07 PM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
<marquee><b>About CHAT App. in PHP4</b></marquee> Ramkrishna PHP How-To 1 September 11th, 2004 07:01 AM
<STRONG> vs <B> and <EM> vs <I> anshul HTML Code Clinic 12 September 1st, 2004 05:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.