Login box popping up!

V

VB Programmer

I am created a ASPX web app. I am using forms authentication and it seems
to be working well.

After logging in I am redirected to a form that is a "Secure" directory.
It's using data coming from a SQL Server db on the internet. Clicking on a
listbox item is supposed to populate the form with data. (It's doing a
postback.)

The first time the form loads it does it fine. But, when I click on a
listbox item (to have the form populated with a new set of data) I get a
Windows login window. Any ideas???

The window title is "Connect to DCQBMR99" which is my pc.

Thanks.
 
G

Guest

How does your Authentication WORK?
Becos it seems the page isn't authorised so u needed to Authenticate!!
Patrick
 
V

VB Programmer

In a nutshell:

My normal web.config is setup like this:
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name="sqlAuthCookie" timeout="60"
path="/">
</forms>
</authentication>
<authorization>
<allow users="*" /> <!-- Allow all users -->
</authorization>

The secured page is in a Secured dir. My complete web.config in this dir is
this:
<configuration>
<system.web>
<authorization>
<deny users="?" />
<allow users="*" />
</authorization>
</system.web>
</configuration>

When I load up the page in the Secured dir it auto-redirects me to
Login.aspx (which is good). After the user types in a correct
userid/password I simple do a response.redirect to the ReturnUrl from the
QueryString.

The secured page initially loads with NO Windows login prompt. But on the
postback it prompts me.

Any ideas?

Thanks.
 
V

VB Programmer

I fixed it. DO NOT USE RESPONSE.REDIRECT.

Use this:
System.Web.Security.FormsAuthentication.RedirectFromLoginPage(Me.txtUserName.Text,
True)

Duh.... me
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top