Wednesday, March 21, 2012

RS2005 and 401 - Unauthorized.

After a long time, I finally got my asp.net application to authenticate
with RS 2005..
I have a server with Windows 2003 Server and SQL 2005/RS 2005. I created
a user in the domain just for ReportViewer, and granted access in RS 2005.
In my project, I implemented IReportServerCredentials like this:
public bool GetFormsCredentials(out Cookie authCookie, out string
userName, out string password, out string authority)
{
authCookie = null;
userName = null;
password = null;
authority = null;
return false;
}
public WindowsIdentity ImpersonationUser
{
get
{
return null;
}
}
public ICredentials NetworkCredentials
{
get
{
return new NetworkCredential(_user, _pass, _domain);
}
}
It works perfectly running the ASP.NET application in my computer,
winXP/IIS 5.1, but when I deploy the exact same site in the win2003
server (the same from RS), I get this error:
The request failed with HTTP status 401: Unauthorized.
I checked the EventViewer, and when running from my computer, I get this:
Successful Network Logon:
User Name: USER
Domain: DOMAIN
but when running from the server, I get this:
Logon attempt using explicit credentials:
Logged on user:
User Name: NETWORK SERVICE
Domain: NT AUTHORITY
Logon ID: (0x0,0x3E4)
Logon GUID: -
User whose credentials were used:
Target User Name: MYUSER
Target Domain: DOMAIN
Target Logon GUID: -
And nothing more.
I tried the help, it didn't help much.
Anyone know what is the problem here?
Thanks in advance.I just enabled auditing failure events, and I get this from windows 2003
server:
Logon Failure:
Reason: An error occurred during logon
User Name: USER
Domain: DOMAIN
Logon Type: 3
Logon Process: Ðùë
Authentication Package: NTLM
Workstation Name: SERVER
Status code: 0xC000006D
Substatus code: 0x0
I have no idea what is happening. The username and password are right,
since they work in my computer and is a domain user, and the web server
is a domain computer...
help please!
Natan Vivo wrote:
> After a long time, I finally got my asp.net application to authenticate
> with RS 2005..
> I have a server with Windows 2003 Server and SQL 2005/RS 2005. I created
> a user in the domain just for ReportViewer, and granted access in RS 2005.
> In my project, I implemented IReportServerCredentials like this:
> public bool GetFormsCredentials(out Cookie authCookie, out string
> userName, out string password, out string authority)
> {
> authCookie = null;
> userName = null;
> password = null;
> authority = null;
> return false;
> }
> public WindowsIdentity ImpersonationUser
> {
> get
> {
> return null;
> }
> }
> public ICredentials NetworkCredentials
> {
> get
> {
> return new NetworkCredential(_user, _pass, _domain);
> }
> }
> It works perfectly running the ASP.NET application in my computer,
> winXP/IIS 5.1, but when I deploy the exact same site in the win2003
> server (the same from RS), I get this error:
> The request failed with HTTP status 401: Unauthorized.
> I checked the EventViewer, and when running from my computer, I get this:
> Successful Network Logon:
> User Name: USER
> Domain: DOMAIN
> but when running from the server, I get this:
> Logon attempt using explicit credentials:
> Logged on user:
> User Name: NETWORK SERVICE
> Domain: NT AUTHORITY
> Logon ID: (0x0,0x3E4)
> Logon GUID: -
> User whose credentials were used:
> Target User Name: MYUSER
> Target Domain: DOMAIN
> Target Logon GUID: -
>
> And nothing more.
> I tried the help, it didn't help much.
> Anyone know what is the problem here?
> Thanks in advance.|||Hi,
try Changing the your web application app pool identity to run under local
system, it may work. but this is not a correct solution. I have the same
problem, and i am waiting for the solution too
--
Regards
Raja Annamalai
"Natan Vivo" wrote:
> I just enabled auditing failure events, and I get this from windows 2003
> server:
> Logon Failure:
> Reason: An error occurred during logon
> User Name: USER
> Domain: DOMAIN
> Logon Type: 3
> Logon Process: �ùë
> Authentication Package: NTLM
> Workstation Name: SERVER
> Status code: 0xC000006D
> Substatus code: 0x0
> I have no idea what is happening. The username and password are right,
> since they work in my computer and is a domain user, and the web server
> is a domain computer...
> help please!
> Natan Vivo wrote:
> > After a long time, I finally got my asp.net application to authenticate
> > with RS 2005..
> >
> > I have a server with Windows 2003 Server and SQL 2005/RS 2005. I created
> > a user in the domain just for ReportViewer, and granted access in RS 2005.
> >
> > In my project, I implemented IReportServerCredentials like this:
> >
> > public bool GetFormsCredentials(out Cookie authCookie, out string
> > userName, out string password, out string authority)
> > {
> > authCookie = null;
> > userName = null;
> > password = null;
> > authority = null;
> >
> > return false;
> > }
> >
> > public WindowsIdentity ImpersonationUser
> > {
> > get
> > {
> > return null;
> > }
> > }
> >
> > public ICredentials NetworkCredentials
> > {
> > get
> > {
> > return new NetworkCredential(_user, _pass, _domain);
> > }
> > }
> >
> > It works perfectly running the ASP.NET application in my computer,
> > winXP/IIS 5.1, but when I deploy the exact same site in the win2003
> > server (the same from RS), I get this error:
> >
> > The request failed with HTTP status 401: Unauthorized.
> >
> > I checked the EventViewer, and when running from my computer, I get this:
> >
> > Successful Network Logon:
> > User Name: USER
> > Domain: DOMAIN
> >
> > but when running from the server, I get this:
> >
> > Logon attempt using explicit credentials:
> > Logged on user:
> > User Name: NETWORK SERVICE
> > Domain: NT AUTHORITY
> > Logon ID: (0x0,0x3E4)
> > Logon GUID: -
> > User whose credentials were used:
> > Target User Name: MYUSER
> > Target Domain: DOMAIN
> > Target Logon GUID: -
> >
> >
> > And nothing more.
> >
> > I tried the help, it didn't help much.
> >
> > Anyone know what is the problem here?
> >
> > Thanks in advance.
>

No comments:

Post a Comment