Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages12>
Unable to login after AD Integration
benm
#1 Posted : Friday, 30 July 2010 1:39:14 AM(UTC)
Rank: Member

Joined: 5/03/2008(UTC)
Posts: 4
Location: UK

Hi Roger

Firstly, like every one else here I would like to thank you for a thoroughly useful and excellent Web App.

Secondly I was wondering if you could help with a problem I am experiencing;
I have been running the latest version of GSP on Windows Server 2003 and connecting to an SQL Server 2000.
All with no problems.
I then implemented AD integration following your instructions in the Admin guide but now I cannot log in.
I can still access the gallery as an anonymous browser but I get access denied whichever account I use to log in.
There are no crashes or debug errors but the following event is recorded in the Application Log:

Event Type: Information
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1315
Date: 30/07/2010
Time: 12:55:11
User: N/A
Computer: UTAH
Description:
Event code: 4006
Event message: Membership credential verification failed.

Event time: 30/07/2010 12:55:11
Event time (UTC): 30/07/2010 11:55:11
Event ID: 0d62323137994755a0e3544b9897f3ba
Event sequence: 13
Event occurrence: 3
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/Root/Gallery-17-129249619177377483
Trust level: Full
Application Virtual Path: /Gallery
Application Path: c:\inetpub\wwwroot\Gallery\
Machine name: UTAH

Process information:
Process ID: 94096
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Request information:
Request URL: http://utah/Gallery/Default.aspx?g=login&msg=19&ReturnUrl=Membership credential verification failed.fGalleryMembership credential verification failed.fDefault.aspx30/07/2010 12:55:11fmoid30/07/2010 12:55:11d826%26hr30/07/2010 12:55:11d1
Request path: /Gallery/Default.aspx
User host address: 192.168.80.132

User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE

Name to authenticate: administrator


Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Any reference to this error I can find refers to the fact the anonymous IUSR_Server account needs access permissions on a database, obviously in this case the one used by GSP. I have duelly given this permission but to no avail.
See:
http://blogs.msdn.com/b/...l-please-try-again.aspx

Any light you might be able to shed on this issue would be greatly appreciated.

Thanks
Roger Martin
#2 Posted : Friday, 30 July 2010 2:07:24 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

If you had a running instance of GSP and you haven't changed the IIS app pool identity or your connection string in web.config, then your server-to-database connection should be fine.

Your issue is probably one of these:

1. The IIS app pool identity does not have sufficient permission to query AD. As a temporary experiment, change the identity to a Domain Administrator or other high-level account.

2. You are entering the username/pwd incorrectly. Try different combinations with/without the domain. Ex: "MyDomain\Roger" versus "Roger"
Roger Martin
Creator and Lead Developer of Gallery Server Pro
benm
#3 Posted : Tuesday, 3 August 2010 12:22:39 AM(UTC)
Rank: Member

Joined: 5/03/2008(UTC)
Posts: 4
Location: UK

Many thanks for your response Roger but neither solution solved the problem. I have tried several different AD admin accounts for the apps pool and also half a dozen different variations on login style (email address/domain name etc) but still no dice. The original "credential verification" error still occurs. I have even reinstalled GSP from scratch.
All I can think of is that I made a mistake in the original configuration, as follows:

In both instance of me trying to integrate GSP with AD, I experienced the same "cannot find connection string" problem as the forum user "Paul" did in this thread:

http://www.galleryserver...h-Active-Directory.aspx

Your solution was to put in a <clear /> statement in the web.config file.
I wasn't exactly sure where to put it so I put it here:

<membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
<providers>
<clear />
<add name="AspNetActiveDirectoryMembershipProvider"

This seemed to do the trick and the original error went away.
Could you confirm that this is the correct location?

Many Thanks
Roger Martin
#4 Posted : Tuesday, 3 August 2010 12:32:15 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

Yes, that is right. I updated the Admin Guide to include this statement.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
benm
#5 Posted : Tuesday, 3 August 2010 2:42:14 AM(UTC)
Rank: Member

Joined: 5/03/2008(UTC)
Posts: 4
Location: UK

Is the latest version of the guide 2.3.3512, Roger?
I couldn't see the update in that one.
Roger Martin
#6 Posted : Tuesday, 3 August 2010 2:56:08 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

I should have been more clear. I updated my local copy of the Admin Guide so that the next time I publish it, the change will be there.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
mk1 black limited
#7 Posted : Saturday, 7 August 2010 9:09:00 AM(UTC)
Rank: Member

Joined: 7/08/2010(UTC)
Posts: 16
Location: Norway

I've got the same problem as benm. My installation has worked fine alle the time, but the AD integration simply won't work. I've tried all the suggestions above, can't get any further...:-( Any further tips?

PS: Running 2008 r2 and SQL Server 2008 r2.
mk1 black limited
#8 Posted : Wednesday, 11 August 2010 5:06:07 AM(UTC)
Rank: Member

Joined: 7/08/2010(UTC)
Posts: 16
Location: Norway

Bump? ;-)
Roger Martin
#9 Posted : Thursday, 12 August 2010 5:52:13 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

I don't know much about Active Directory - only enough to set up a VM with AD installed and perform a GSP integration. I documented the steps I used to make it work for me.

Here is an idea: Create an empty ASP.NET web application and try to integrate it with AD using one of the many tutorials on the web. If it works, compare it to your GSP configuration to see what is different. If it doesn't work, then you at least have a simple scenario to troubleshoot.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
benm
#10 Posted : Wednesday, 18 August 2010 10:53:35 PM(UTC)
Rank: Member

Joined: 5/03/2008(UTC)
Posts: 4
Location: UK

mk1

Just out of interest, is the IIS server your running GSP on a Domain Controller?

Thanks
mk1 black limited
#11 Posted : Saturday, 21 August 2010 7:33:12 PM(UTC)
Rank: Member

Joined: 7/08/2010(UTC)
Posts: 16
Location: Norway

It is indeed.
mk1 black limited
#12 Posted : Wednesday, 22 September 2010 4:23:08 AM(UTC)
Rank: Member

Joined: 7/08/2010(UTC)
Posts: 16
Location: Norway

Has anybody been able to get this to work? Haven't had time to test Roger's suggestion above about creating an empty ASP.NET web app.
mk1 black limited
#13 Posted : Wednesday, 6 October 2010 6:16:01 AM(UTC)
Rank: Member

Joined: 7/08/2010(UTC)
Posts: 16
Location: Norway

Huh...! I'm actually a step further, but in the admin guide you say:

"Now, at this point you should be able to log on to Gallery Server with your domain account, but you will receive the following message:
This is because your user account is not a member of any roles in Gallery Server Pro. Recall that when you installed Gallery Server Pro, a role named System Administrator was created with administrative permission. Now you need to add one or more AD users to this role. But how do you do this when no one has authorization to perform this task?
If you are using IIS 7, the answer is easy. Open up IIS Manager, navigate to the Gallery Server Pro web app, and click .NET Users. A list of your AD users appears. Double click the one that you want to be the administrator, and add the user to the System Administrator role in the dialog box. The next time you log on to Gallery Server Pro you will have administrative access."

....but I don't have a .NET Users in IIS Manager, Gallery Server Pro web app? Ive got .Net Authorization, Compilation, Error Pages, Globalization, Profile and Trust Levels. But no Users. And none of the .NET-stuff gives me the option to select any AD-users.

I'm running IIS 7.5. Getting closer, but I need a bit of a push...:-)
mk1 black limited
#14 Posted : Wednesday, 6 October 2010 6:29:16 AM(UTC)
Rank: Member

Joined: 7/08/2010(UTC)
Posts: 16
Location: Norway

OK, seems to be related to me using .NET 4.0, and apparently .NET Users doesn't exist in 4.0!

Now what to do?
Roger Martin
#15 Posted : Wednesday, 6 October 2010 7:08:24 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

I am running IIS 7.5 under .NET 4.0, and I have a .NET Users applet in IIS Manager. I am not sure why you do not. I suggest googling around, as I suspect others have been in your shoes. Perhaps there is an IIS component that needs to be installed, but that is just a guess.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
mk1 black limited
#16 Posted : Wednesday, 6 October 2010 7:52:02 AM(UTC)
Rank: Member

Joined: 7/08/2010(UTC)
Posts: 16
Location: Norway

I'll get back to why this works in you setup, but meanwhile, is there any way I can edit the database (SQL Server) directly via SQL Server Management Studio to add a user to the System Administrator role?
Roger Martin
#17 Posted : Wednesday, 6 October 2010 9:16:10 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

I think so. Add a record to the aspnet_UsersInRoles table. I am not sure what you will use for the UserId column, though. You may have to experiment. Get the RoleId from the aspnet_Roles table.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
mk1 black limited
#18 Posted : Wednesday, 6 October 2010 9:33:12 AM(UTC)
Rank: Member

Joined: 7/08/2010(UTC)
Posts: 16
Location: Norway

Thanks, but that didn't work too well. ;-) I experimented using an existing user, added by using non-AD integration.

If one should try to register a new AD-user, manually by entering data directly into the database, what tables and fields would need to be entered?

PS: About why this is a problem in the first place, the Default App Pool runs by default in NET 2.0, but mine runs in 4.0. And if it runs in 4.0, you will not get the .NET Users. See here: http://blogs.ignia.com/L...shipadministration.aspx

Can't get the workaround to work either...argh...
Roger Martin
#19 Posted : Wednesday, 6 October 2010 9:56:35 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

I see what you mean. I get a .NET Users icon in all my 2.0 apps, but not my 4.0 ones. That is a real monkey wrench into getting this set up. MS better resolve this...

The best thing I can suggest is to set up a test site running under .NET 2.0 and do it there, then inspect the aspnet_ tables, which will tell you what you need to do in your .NET 4.0 app. Then post your findings here to help the rest of us.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
mk1 black limited
#20 Posted : Friday, 8 October 2010 6:21:56 AM(UTC)
Rank: Member

Joined: 7/08/2010(UTC)
Posts: 16
Location: Norway

OK, started on that on another server but ended up with another strange error (internal error 500 etc.), so searched som more: Here: http://forum.winhost.com...e/index.php/t-4003.html - they say:


"Certain IIS Manager modules cannot be used if your site is running .NET 4.0. Currently, IIS Manager modules run as .NET 2.0, so it cannot load .NET 4.0 assemblies, like the .NET 4.0 SQL membership provider. Microsoft has not issued a fix for this yet. In the meantime, you can manage your membership users locally using the ASP.NET Configuration tool within Visual Studio 2010."

Aha! Went into Visual Studio 2010, opened the GSP application and..."There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: Unrecognized configuration section system.web.extensions. (web.config line 123) "

...which says:

<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2147483647" />
</webServices>
<scriptResourceHandler enableCompression="true" enableCaching="true" />
</scripting>
</system.web.extensions>

Removing this section altogether to get further throws another error: "There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive. (web.config line 31) "

...etc. Getting a bit tired of this now, and I'm about to bail out of the AD integration all together I'm afraid.

Rss Feed  Atom Feed
Users browsing this topic
Guest
2 Pages12>
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.