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


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

sql authentication mode

Posted By:      Posted Date: October 16, 2010    Points: 0   Category :ASP.Net
 

I wanted my local iis running application to connect my database in sql authentication mode rather than windows mode,

but it is showing errors of "

Cannot open database "aspnetdb" requested by the login. The login failed.
Login failed for user 'DBUser'.

". i also ublocked port from firewall,and allowed remote connection of mssql from sql manager, enabled TCP/IP and named piped protocols from SQL surface config, and with sql manager i also changed server authentication mode to sql from windows.

my datastring is <add connectionString="Data Source=PARTHIV-PC\SQLEXPRESS;Initial Catalog=aspnetdb;User ID=******;Password=******/" name="LocalSqlServer" providerName="System.Data.SqlClient" />

i made a user named DBUser in database as well

i don't understand where it gone wrong ???

here is error log

 Cannot open database "aspnetdb" requested by the login. The login failed.
Login failed for user 'DBUser'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot op


View Complete Post


More Related Resource Links

SSRS 2005 "Mixed" Authentication Mode

  

I have a web application where users can authenticate using either SiteMinder or Windows domain accounts.  This is actually configured as two separate virtual directories within IIS 6.  Both applications need to use the same instance of SSRS.  Is it possible to configure the SSRS web application so that if a user is authenticated by SiteMinder it impersonates a Windows account, but if they are already Windows-authenticated that account is used instead?


SQL Server 2008 Windows Authentication Mode fails for Database Engine, error 18456

  
I installed SQL Server 2008 Developer Edition (10.0.1600.22.080709-1414) on a Windows Vista 32-bit development machine with Windows Authentication Mode only (no SQL Server Authentication).   Since this is a development machine, I saw no need for Mixed Mode when I did the install.  The SQL Server Management Studio allows me to login to Analysis Services, Integration Services, Reporting Services, BUT NOT the Database Engine!Windows Authentication for the Database Engine gives the following error: EventID: 18456Login failed for user MYDOMAIN\MYLOGIN'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous errors. [CLIENT: <local machine>]The 'fix' I have found online is to login as SA in SQL Server Authentication mode & add MYDOMAIN\MYLOGIN as a administrator for the Database Engine.  Unfortunately, I can't since I didn't install SQL Server Authentication mode (only Windows Authentication Mode).  It appears my only recourse is to uninstall, then reinstall in Mixed mode, then to login as SA in SQL Server Authentication mode & add MYDOMAIN\MYLOGIN as a administrator for the Database Engine. Before I do so, does anyone know of a better approach?Scott D Duncan

Login issue using authentication mode="Forms"

  
Hi,I am using authentication mode="Forms" with ldap, i manage to login and logour fine but when user 1 is logged and when user2 logs, user1 gets the user2 session. Any idea why this might be happening? Here is some code:     <authentication mode="Forms">            <forms name="login" loginUrl="Login.aspx" />        </authentication>        <authorization>            <allow roles="auditor"/>            <allow roles="approver"/>            <allow roles="user"/>            <deny users="?"/>        </authorization>        <identity impersonate="true"/>protected Boolean ValidateUser(String strUsername, String strPassword)        {            //Return true if the username and password is valid, false if it isn't             &n

mixed mode authentication

  

I'm trying to build the mixed authentication and have the following problem:

I have a sub application of main application. The main application has the forms authentication enabled and sub- application has windows authentication enabled.

When I start debugging in main application I get nothing and when I start debugging from sub application (name = WinLogin) - after string user = Request.ServerVariables["LOGON_USER"];

 

FormsAuthentication.RedirectFromLoginPage(user, true);

I'm redirected to   /Wholesale/WinLogin/Admin/Order.aspx instead of  /Wholesale/Admin/Order..

<authentication mode="Forms">

SQL 2008 - Switching to Windows Authentication Mode

  

I'm thinking of switching to Windows Authentication on my SQL 2008 server.  Here's my first draft at a plan:

1.  Create Windows accounts matching the exiting SQL accounts.
2.  Grant the new Windows accounts the appropriate database permissions.
3.  Change applications to use the new account information.
4.  Remove the SQL accounts
5.  Switch SQL to Windows Authentication

Is is that simple?  Or am I missing something?


Basic Authentication using security mode TransportCredentialOnly

  

i am trying to achieve username/password authentication using Basic as security mode in my config file. i have a requirement to make my service available on HTTP so HTTPS is not an option. The other requirement that i have is that the client should be authenticated (from a database so Windows authentication is not an option) using username and password that he will provide.

following is the code:

A class added in the service project:

public class ServiceValidator : UserNamePasswordValidator
    {
        public override void Validate(string userName, string password)
        {
            // This isn't secure, though!
            if ((userName != "mohsin") || (password != "mohsin"))
            {
                throw new SecurityTokenException("Validation Failed!");
            }
        }
    }

my service.config looks like this

<bind

Kernel-Mode authentication without Kerberos

  

I have installed a new SharePoint 2010 farm and am using NTLM authentication.  When i try to access CA i am asked to login 3 times. After doing so i have a blank screen.  I have seen many posts here and elsewhere with this same symptom and it looks like it is usually a problem with Kerberos, but i am not using that.

I have determined that if i enable kernel-mode authentication all seems to work. i have tested several times enabling and disabling kernel-mode authentication in IIS and it always works.  If kernel-mode is enabled i can get to CA if kernel-mode is disabled i cannot get to CA.  What is troublesome is i have read a few posts that say that for SharePoint Kernel-mode should be disabled. So my question is, should i have kernel-mode enabled on sharepoint iis web sites when i am not using Kerberos?  And what about this extended protection?

Steven Albrecht
University of Colorado Denver


Sql Server 2008 logs Authentication mode incorrectly avoids remote login

  

Im trying to connect SQL server 2008 Express R2 installed on XP sp3 pc through ODBC SQL Server driver with a Windows 7 PC. I managed to define static IP ports and setup firewall. Now the ODBC connection successfully gets created by accepting uid : sa and my password given.

Now Im getting "login failed for user ". " msg from my application. When I run the same application with same ODBC connection created in the SQL server PC it works fine. The two pcs operate in a workgroup.

Following  is the error log. Im surprised to note that the server logs its in Mixed mode initially and later makes a cry that its in Windows Authentication mode. !!!!

010-07-25 15:19:53.76 Server      Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86)
    Apr  2 2010 15:53:02
    Copyright (c) Microsoft Corporation
    Express Edition with Advanced Services on Windows NT 5.1 <X86> (Build 2600: Service Pack 3, v.3311)

2010-07-25 15:19:53.76 Server      (c) Microsoft Corporation.
2010-07-25 15:19:53.76 Server      All rights reserved.
2010-07-25 15:19:53.76 Server      Server process ID is 3552.
2010-07-25 15:19:53.76 Server      Auth

Mixed mode authentication in sharepint 2010

  

Hi,

Is it possible I have two mixed FBA in sharepiont 2010? For example, one custom membershipprovider reads data from Database1, the other custom membershipprovider reads from Database2?

Thank you

 


Rui

SQL authentication mode

  

I wanted my local iis running application to connect my database in sql authentication mode rather than windows mode,

but it is showing errors of "

Cannot open database "aspnetdb" requested by the login. The login failed.
Login failed for user 'DBUser'.

". i also ublocked port from firewall,and allowed remote connection of mssql from sql manager, enabled TCP/IP and named piped protocols from SQL surface config, and with sql manager i also changed server authentication mode to sql from windows.

my datastring is <add connectionString="Data Source=PARTHIV-PC\SQLEXPRESS;Initial Catalog=aspnetdb;User ID=DBUser;Password=12qwaszx/" name="LocalSqlServer" providerName="System.Data.SqlClient" />

i made a user named DBUser in database as well

i don't understand where it gone wrong ???

error log

 Cannot open database "aspnetdb" requested by the login. The login failed.
Login failed for user 'DBUser'.
Description: An unhandled excepti

Website Windows Authentication fails when enabling SQL Mixed Mode.

  

Hello all,

Just to describe the scenario. I have a website. This lives on a webserver. On that webserver is an SQL server. The website connects to this database using windows authentication. I have written a windows form application that connects to the SQL Server on the webserver. This application is being run from a location on out intranet. The Winform application use SQL authentication to connect to the database. The SQL Server didn't have mix mode authentication enabled. So I enabled it. The winform application could now connect to the SQL Server.

This is where it starts getting a little strange.

The Website that was already connecting find using integrated authentication starts failing with:

Login failed for user 'NT AUTHORITY\NETWORK SERVICE'

When you are enabling mixed mode authentication, you are adding another authentication method, why would the original Windows authentication fail?


Thanks for any suggestions and sorry if this is completely the wrong place to be asking this question,

d3

authentication mode on webconfig

  

Hi there,

I have an ASP.net website running with the authentication mode on the web.config file is Windows.  The webpages at the root do not need to have login & password form.

Now I created a subfolder called 'reports' and would like to implement a few web pages with the login & password authentication form. 

Question, do I need to create another web.config file in the 'reports' folder and update the authentication mode="Forms"?  Any ideas?

Your help is much appreciated.  Thanks.

 

 

 


InfoPath 2010 does not work in claims authentication mode on SharePoint 2010

  

Hi everyone,

I created an Infopath 2010 Forms published on a Claims-based authentication site collection. This form has an external datasource plugged on the _vti_bin/UserProfileService.asmx webservice (within the same site collection). This datasource is queried when the form opens. When I check this form with Infopath designer preview, everything works fine.

But once this forms is published, an error "Error while trying to contact Web Service" occured when opening a new form.

Here ere an extract of the logs:

The following query failed: GetUserProfileByName (User: DOMAIN\username, Form Name: library, IP: , Connection Target: , Request: http://server/_layouts/FormServer.aspx?xsnLocation=http://server/library/forms/template.xsn?DefaultItemOpen=1&Source=http://server/page.aspx, Form ID: urn:schemas-microsoft-com:office:infopath:library:-myXSD-2010-01-12T23-08-28 Type: DataAdapterException, Exception Message: The remote server returned an error: (500) Internal Server Error.
Server was unable to process request. ---> Attempted to perform an unauthorized operation.
The remote server returned an error: (500) Internal Server Error.)

Here is an extract of my IIS log:

2010-11-25 13:45:30 fe80::b9ab:23d9:ff9e:bb23%11 POST /_vti_bin/userprofileservice.asmx - 50

Re-login to SQL Server 2008 in Windows authentication mode after resetting my Windows login password

  

Hello,

I recently reset my Windows login password but from then onwards SQL Server 2008 is not allowing me to login in Windows authentication mode.

Can someone please help on where I can go and set my new Windows Login password in SQL Server 2008 and continue to login in Windows authentication mode?

Thank you,


Anish Ravindran

Explained: Forms Authentication in ASP.NET

  
This module explains how forms authentication works in ASP.NET version 2.0. It explains how IIS and ASP.NET authentication work together, and it explains the role and operation of the FormsAuthenticationModule class.

Using Forms Authentication in ASP.NET - Part 1

  
Classic ASP developers often had to "roll their own" authentication scheme, however, in ASP.NET much of the grunt work has been taken out. This article outlines how things have changed and how FormsAuthentication can be used to secure a Web site with a minimal amount of code.

ASP.NET Forms Authentication - Part 1

  
Often, in legacy Web applications, users authenticate themselves via a Web form. This Web form submits the user's credentials to business logic that determines their authorization level. Upon successful authentication, the application then submits a ticket in the form of a cookie, albeit a hard cookie or session variable. This ticket contains anything from just a valid session identification access token to customized personalization values.
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