.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Changing WindowsIdentity creates sql login errors for integrated security connections

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :ASP.Net
 

I am using winows authentication to connect to a web page and user.identity and principle.windowsidentity are showing as my currently logged in active directory user.  I can successfully connect to SQL Server with a integrated security connection string at this point.

I then prompt the user for login as a different account on the domain and change the principle.windowsidentity to this login using

 

<DllImport(

 

"advapi32.dll", SetLastError:=True)> Private Shared Function LogonUser(ByVal lpszUsername As String


View Complete Post


More Related Resource Links

Intranet Users Challenged When Using Windows Integrated Security

  

We've setup an intranet site using Windows Integrated Security. Its up and running and users can access it. However, they are being challenged with a login dialog for the server when they initially access the site.

Isn't is possible to configure the server so that the users aren't challenged AND are recognized as being already authenticated by Windows? We're trying to go with a seamless experience, whereby all they have to do is login to their machine like normal and then go from there.


Desktop Security: Create Custom Login Experiences With Credential Providers For Windows Vista

  

Why is a change to the Windows logon plug-in interface so exciting? Because with credential providers you can customize the logon experience for your users.

Dan Griffin

MSDN Magazine January 2007


SSRS2008: no Integrated Security; MOSS integrated; WebfrontEnd separate

  
Hi, we have the following setup: 2 webfrontend servers MOSS 2007 with RS addin 1 MSSQL 2008 Cluster 1 MSSQL 2008 with Reporting Services installed when trying to use integrated security in the datasource, i receive the exception saying that integrated security is not configured. doing this on a standalone (MOSS, SQL, SSRS) environment everything works. Do I need to configure the usage of integrated security? Maybe Kerberos ? Regards Sven

Subscriptions using Windows Integrated Security (Datasource)

  
Hi All, Having an issue with SSRS 2008 at the moment, trying to setup subscriptions.Our system is configured so that any one of 10 users can login to the SSRS website using their windows domain account, and then launch report builder to design and save reports.  This all works very well, however, they have a problem when trying to setup subscriptions - the famous "Subscriptions cannot be created because the credentials used to run the report are not stored....."What the message says is true - the credentials are not stored as they are supplied by the user when they login to report builder.Is the /any/ workaround at all that doesn't involve storing the credentials?  It seems totally crazy that they cannot be prompted for them when setting up the subscription.  For this application its 100% essential to make the user provide their credentials when running reports, because they each see a filtered subset of the data in the report model (this is controlled DB side depeding on the login account), so their domain account needs to be passed to SQL server to enable this filtering to work.  If we saved their credentials then they would see all the data..and thats nasty.The only workaround I can come up with would be to create  a separate datasource for each user and upload a separate model, but thats really nasty to be honest and creates an ad

IIS 7 - Integrated security

  
Hi, I'm trying to use integrated security in IIS7 (Windows 2008) to connect to a database and add some tables as part of a Vistual Studio installer. I've set up my Application Pool so it users a domain user account to run the pool. As part of the installer, I connect to the database and add some tables though it doesn't seem to recognise the Application Pool indentity from the installer. The same method works fine in Windows 2008 R2 but Windows 2008 seems to have issues with this. I know it's a long shot but has anyone got any ideas? Regards Chris 

JDBC and Integrated security

  
So, I'm still getting errors when configuring a connection with integrated security: and YES, I copied the sqljdbc_auth.dll into system32 directory (and I put a copy into systemWOW64 also.).<---   error message:ect to Development Server.  Error creating SQL Model Connection connection to Development Server. (Error: This driver is not configured for integrated authentication.)  This driver is not configured for integrated authentication.  Error creating JDBC Connection connection to Development Server. (Error: This driver is not configured for integrated authentication.)  This driver is not configured for integrated authentication.end error message --->I'm no expert here, but the message indicates, to me, that it's the *driver* that doesn't support integrated security. WTF? Was this an oversight? Or is something wrong on my side (Win 7, SQL2005, Eclipse Data Tools, sqlJDBC4, both ver 2.0 and v3[CTP]). I saw messages relating back to version 1.2 that this problem would be fixed.Mark

Changing datacontext gives binding errors

  
On the change of the datacontext (of a user control), I check the type of the datacontext. If required (in my case, the datacontext is of a specific type), I want to change the datacontext. As soon as I change the datacontext, the DataContext property is correctly updated. However, I still get binding errors that "Property 'x' is not found on type 'y'", where 'y' is the old datacontext type. Is there any specific steps I have to take to successfully update the datacontext (and the bindings) to the new datacontext object?Geert van Horrik - CatenaLogic Visit my blog: http://blog.catenalogic.com Looking for a way to deploy your updates to all your clients? Try Updater!

"The Windows Security layer always falls back to NTLM when connections are made locally"

  
Using Kerberos with SQL Server tells (in Comments): "Il-Sung Lee 27 Nov 2006 4:12 PM The Windows Security layer always falls back to NTLM when connections are made locally.  This appears to be the design of SSPI when NEGOTIATE is used so what you are seeing is expected" And how to avoid "NEGOTIATE"? I am curious about 2 aspects: 1) Why BEGOTIATE is used for local connections? What os the point in it for internal connections? 2) Does it mean that I cannot force/trick into using  Kerberos developing against local SQL Sever?

Report Manager Security: If a user login to Report Service than he should be able to see only a fold

  
Report Manager Security: If a user login to Report Service than he should be able to see only a folder for which he has role assing and rest of the folder should be hidden for him. How this security i can achive with c#

An exception occurred when trying to issue security token: The trusted login provider did not supply

  
We are facing the issue after got authenticated by OpenID and forwarded back to Sharepoint, it crashed at the /_trust/ page the error "Operation is not valid due to the current state of the object." and event log shows this:   "An exception occurred when trying to issue security token: The trusted login provider did not supply a token accepted by this farm... "    

Windows Security Login popup for 3 times after logged in after changed theme banner

  

Hi experts,

I do have problem with my SharePoint theme. I have actually create new theme by customized a theme from the default theme in SharePoint. I have replace with new banner and do some changes in the coding site.

After i have applied the theme to my portal, i face problem when i try to logged in using a username from Read Only group, it will appear the windows security login for 3 times before the portal can be access, unfortunately the banner are still not visible. Sometimes, its appear, sometime it didn't. 

However, when i logged in user System Account, i have no problem accessing the page without windows security login appear and the banner are there.

What am i missing, please do let me know. Thank you.


changing active directory login name

  
So the guys at my company have been changing the AD login names for women that get married. For example Jenny Smith got married to Bob Right, AD\jsmith changes to AD\jright.  This doesn't cause any problems until we changed servers and used microsoft's login transfer script.  It scripts out Jenny's login as AD\jsmith, and then when you run the script it says:

Msg 15401, Level 16, State 1, Line 3
Windows NT user or group 'AD\jsmith' not found. Check the name again.

I know someone else has had to deal with this, is this just a bug?

also if i were to add AD\jright when AD\jsmith is already on the server it says AD\jright is already added to the security.

Security concerns with allowing post login infromation

  

I have a third party company that we need to allow they users to pass into our website without loging in. TO keep it easy I was thinking of having them post to a custom login page on my site.

 

So their code would be something like this:

  

<form method="post" action="https://www.mywebsite.com/TestLandingPage.aspx">
username: <input id="username" name="username" type="text" />
Password: <input id="password" name="password" type="text" />
<input id="sbmtLogin" type="submit" value="Login" />
</form>

My landing/login page would do soemthign liek this.

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            If Not Page.Request.Form("username") Is Nothing AndAlso Not Page.Request.Form("password") Is Nothing Then
                Dim sUsername As String = Page.Request.Form("username").ToString()
                Dim sPassword As String = Page.Request.Form("password").ToString()

                'test user credentials

            Else
                ' login error
            End If
        E

SharePoint 2010 Security (Prompts for Login) Issue with SSRS report with Out of Box Web Part

  

Hi All,

I have a SSRS Customized Report (.RDL). I have a web part with association on one of the report. When I try visit the page I am prompted for credenatial.

My Data Source Properties are as per below

Use this user and Password

  user name: domain\myadminuser

  password:****

Selected: use as win auth

Selected: Impersonate

 

How Can I get rid of prompt?

 

 

 

 


Pathik

SharePoint 2010 Security (Prompts for Login) Issue with SSRS report with Out of Box Web Part

  

Hi All,

I have a SSRS Customized Report (.RDL). I have a web part with association on one of the report. When I try visit the page I am prompted for credenatial.

My Data Source Properties are as per below

Use this user and Password

  user name: domain\myadminuser

  password:****

Selected: use as win auth

Selected: Impersonate

 

How Can I get rid of prompt?

 

 

 

 


Pathik

How set connection Integrated Security property

  

Does anyone have a handy snippet of code in C# or VB.net to find and set the "Integrated Security" property of a connection?

I used to do this stuff in DTS, but ... that was a long time ago!

Thanks.

Josh

 


What is causing these Login failed for ANONYMOUS LOGON errors?

  

I have a SQL 2005 SP3 cluster running on Veritas Cluster Server (Storage Foundation HA 5.1 SP1).

The cluster has 2 nodes and is configured with 2 SQL Instances running on seperate virtual servers.

The only SQL services installed on each instance/server is Database Services, each instance has the following SQL Services - SQL SERVER (instancename ), SQL Server FullText Search (instancename ) and SQL Server Agent (instancename ).

We are seeing seemingly random occurances of the error below in the logs for each instance, the client ipaddress specified is that of the alternate cluster node (i.e the server not running the instance):

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. [CLIENT: ipaddress ]

This error is preceeded by Error: 18456, Severity: 14, State: 11

These errors are appearing in the logs for both instances.

Having read several articles/discussions regarding this error I see it is commonly related to kerberos/IIS/Reporting services and such, however we are not using any of these services, furthermore the instances are currently empty - hosting nothing but the default system databases.

For both instances all SQL services are running as a named domain user account, there are no SQL processes running as SYSTEM users.

Can anyone give any indication as to

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend