Thursday, March 22, 2012

Login not working when using IIS 6.0

Hi All.

I am new to ASP.NET 2.0 development, and am writing a small
application to log time and expenses for projects.

I have successfully set up Membership, Role and Profile providers
using the 'SqlProvider's and all appears to be well while I am using
the built in 'ASP.NET Development Server'. I am also using SQL Server
2005 Standard Edition - not Express.

I am able to log in as users and get the 'You are logged is as
<username>' response displayed in my LoginVierw control. I have even
created a new webform which returns the GUID of the logged in user.
This successfully displays a user GUID.

However, when I use IIS 6.0 I can enter my username and password but I
am not logged in successfully. **No** error message is generated, and
I am **not** presented with the 'failed to log in' message or an
incorrect password message. I am redirected to another page and the
LoginView control still stays 'Not Logged In'. When I go to my web
form which returns the logged in user GUID I get an error because the
control is empty - because the user isn't logged in.

I have checked the applicationName properties in web.config, and these
match those in the aspnet_Applications database table. I have also
tried creating a new user via my application, and the user is created
correctly as I can see it in the aspnet_Users database table. However
I cannot log in as this new user as I get the same behaviour as I
described above.

I have seen other posts on this, but they all mention getting 'failed
to log in' messages, but I don't. I have tried everything I can thing
of and goole for, but am getting nowhere

Please help!!!!! :o)

TIA

ShaunOn 18 Nov, 17:52, shaun.laugh...@.gmail.com wrote:

Quote:

Originally Posted by

Hi All.
>
I am new to ASP.NET 2.0 development, and am writing a small
application to log time and expenses for projects.
>
I have successfully set up Membership, Role and Profile providers
using the 'SqlProvider's and all appears to be well while I am using
the built in 'ASP.NET Development Server'. I am also using SQL Server
2005 Standard Edition - not Express.
>
I am able to log in as users and get the 'You are logged is as
<username>' response displayed in my LoginVierw control. I have even
created a new webform which returns the GUID of the logged in user.
This successfully displays a user GUID.
>
However, when I use IIS 6.0 I can enter my username and password but I
am not logged in successfully. **No** error message is generated, and
I am **not** presented with the 'failed to log in' message or an
incorrect password message. I am redirected to another page and the
LoginView control still stays 'Not Logged In'. When I go to my web
form which returns the logged in user GUID I get an error because the
control is empty - because the user isn't logged in.
>
I have checked the applicationName properties in web.config, and these
match those in the aspnet_Applications database table. I have also
tried creating a new user via my application, and the user is created
correctly as I can see it in the aspnet_Users database table. However
I cannot log in as this new user as I get the same behaviour as I
described above.
>
I have seen other posts on this, but they all mention getting 'failed
to log in' messages, but I don't. I have tried everything I can thing
of and goole for, but am getting nowhere
>
Please help!!!!! :o)
>
TIA
>
Shaun


Hello Shaun

It sounds like a typical setup and deployment problem on the target
server. You mention IIS 6.0 but does the host server have FrameWork 2
installed? Also check that the web site/application folder are
configured to use ASP.NET 2.x - run IIS manager, get the web site
properties dialog up and look at the ASP.NET tab

HTH
Hi Phil.

Thanks for the prompt response.

I currently have W2k3 Server installed on my workstation along with
SQL Server 2005. It has .NET Framework 2.0 installed and am using
Visual Web Developer 2005. So essentially I am doing everything on
the same box.

I have my default website set up with a Virtual directory below that.
The Virtual Directory point directly to my development source. Both
the Default website have the ASP.NET version set to 2.0.50727.

If you have any more ideas as to what might be casuiong this I would
appreciate it. In the meantime, I'm going to set up a Virtual Machine
and install W2K3 and SQL Server 2005 on that and see what happens.

Thanks

Shaun

On 18 Nov, 18:46, Phil H <goo...@.philphall.me.ukwrote:

Quote:

Originally Posted by

On 18 Nov, 17:52, shaun.laugh...@.gmail.com wrote:
>
>
>
>
>

Quote:

Originally Posted by

Hi All.


>

Quote:

Originally Posted by

I am new to ASP.NET 2.0 development, and am writing a small
application to log time and expenses for projects.


>

Quote:

Originally Posted by

I have successfully set up Membership, Role and Profile providers
using the 'SqlProvider's and all appears to be well while I am using
the built in 'ASP.NET Development Server'. I am also using SQL Server
2005 Standard Edition - not Express.


>

Quote:

Originally Posted by

I am able to log in as users and get the 'You are logged is as
<username>' response displayed in my LoginVierw control. I have even
created a new webform which returns the GUID of the logged in user.
This successfully displays a user GUID.


>

Quote:

Originally Posted by

However, when I use IIS 6.0 I can enter my username and password but I
am not logged in successfully. **No** error message is generated, and
I am **not** presented with the 'failed to log in' message or an
incorrect password message. I am redirected to another page and the
LoginView control still stays 'Not Logged In'. When I go to my web
form which returns the logged in user GUID I get an error because the
control is empty - because the user isn't logged in.


>

Quote:

Originally Posted by

I have checked the applicationName properties in web.config, and these
match those in the aspnet_Applications database table. I have also
tried creating a new user via my application, and the user is created
correctly as I can see it in the aspnet_Users database table. However
I cannot log in as this new user as I get the same behaviour as I
described above.


>

Quote:

Originally Posted by

I have seen other posts on this, but they all mention getting 'failed
to log in' messages, but I don't. I have tried everything I can thing
of and goole for, but am getting nowhere


>

Quote:

Originally Posted by

Please help!!!!! :o)


>

Quote:

Originally Posted by

TIA


>


Hi

Quote:

Originally Posted by

Quote:

Originally Posted by

Shaun


>
Hello Shaun
>
It sounds like a typical setup and deployment problem on the target
server. You mention IIS 6.0 but does the host server have FrameWork 2
installed? Also check that the web site/application folder are
configured to use ASP.NET 2.x - run IIS manager, get the web site
properties dialog up and look at the ASP.NET tab
>
HTH- Hide quoted text -
>
- Show quoted text -

0 comments:

Post a Comment