Showing posts with label authentication. Show all posts
Showing posts with label authentication. Show all posts

Wednesday, March 28, 2012

Invalid URI: The format of the URI could not be determined

I'm using the sample on custom authentication from msdn but whenever I try to login I get this message.What URI are they complaining about? Has it anything to do with the custom cookie handling? I cant for the world understand whats wrong.

I had to replace the url to the service in the proxy.

But now I have problems with the cookie. Authorization ticket not received by LogonUser

|||

Am I the only one with this problem?

Could the problem be that I'm using two instances of reporting services? I thought that it was a good idea to create two instances of reporting services to be able to preserve our project portal (team foundation, sharepoint) with windows authentication and use the other one for development with forms authenitcation.

Anyone? Any input would be useful.

|||

Maybe this link will be of some help to you:

http://msdn2.microsoft.com/en-us/library/ms155878.aspx

Shyam

|||Thanks Shyam for your reply but sadly it didnt make any difference.

Friday, March 9, 2012

Invalid authorization specification

Hi:

I'm trying to connect to a data base of "sql server 2005 enterprise" named BCR.
The server name is "server1"
I'm using Windows Authentication to connect to server
The operating system is Windows Server 2003 Enterprise Edition Service Pack 1

When I run the aspx I get this error at line 21

System.Data.OleDb.OleDbException: Invalid authorization specification Invalid connection string attribute at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) at System.Data.OleDb.OleDbConnection.InitializeProvider() at System.Data.OleDb.OleDbConnection.Open() at ASP.pruebaLeeSqlServer_aspx.__Render__control1(HtmlTextWriter __output, Control parameterContainer) in Z:\Digital\pruebaLeeSqlServer.aspx:line 21

This is my code:

Dim str2 As String = "Provider=SQLNCLI; Server = server1; Database = BCR"
Dim cnn2 As OleDbConnection = New OleDbConnection(str2)
Dim cmd2 As New OleDbCommand()
Dim drd2 As OleDbDataReader
Try
cnn2.Open()
cmd2.Connection = cnn2''''line 21
cmd2.CommandText ="SELECT LastName FROM Employees"
drd2 = cmd2.ExecuteReader
Do While drd2.Read
%>
<%=drd2.GetString(0)%><br>
<%
Loop
drd2.Close()
Catch exc1 As Exception
%>
<%=exc1.ToString()%>
<%
Finally
cnn2.Close()
End Try

What could be wrong?
Do I need enable permission for asp.net in sql server?
how I can do it?

Thanks!!

You should be using the objects in the System.Data.SqlClient namespace to connect to MS SQL Server, not System.Data.OleDb. That should fix your issue given that there is no problem with your connection string.

HTH,
Ryan

|||thanks Ryan. It works!

I are right, I had to use System.Data.SqlClient namespace instead of System.Data.OleDb. And I just change my connection string to

"Server=server1; Database=BCR; Trusted_Connection=True;"

Thanks!

Friday, February 24, 2012

Intranet, windows authentication, Sql Server Login Failed for user (null)

Hi--

I am building an intRAnet website using windows authentication for website access and SQL Server access ( Trusted_Connection = true ).

In IIS I have these settings:

Allow Anonymous = unchecked (false)Windows Authentication = Checked (true)Digest windows = checked (true)

In my Web.Config file:

authentication="windows"impersonate="true"allowusers="*"

When I pull up the page these are my credentials:

Security.Principal.Windows: mydomain\myuserid (this is correct what it shows on my page)

Me.User.Identity: mydomain\myuserid (this is correct what it shows on my page)

Threading.currentThread.currentUser mydomain\myuserid (this is correct what it shows on my page)

So the ASP.NET page recognizes it is me and my domain. However, when i click a button to pull some data from a database I get the error message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

My data access on SQL Server works fine. The weird thing is when I debug on my machine it pulls data fine. but when I copy the files to the windows 2003 server it doesn't work.

Do i have to do something with delegation?

some guys and i did some research and we think that kerberos delegation is not enabled on our domain in active directory.

When i take off digest, and select basic authentication the credentials pass...but i don't want that.

Sunday, February 19, 2012

Internet URL Access

I am creating a web appliction to access Reporting Service, but I got some
problem
1. User loges on web application via Forms Authentication
2. User types in report parameters.
3. Program gets all parameters, then call Reporting Server URL to get report.
It works fine with intranet, but it doesn't work with internet, because the
reporting service uses Windows Authentication. I don't want allow Anonymous
access Reporing service.
What should I do?Can you use the RS web service to render your reports? The user can log
into your app as normal, and in your code, you supply credentials (that will
authenticate) to the RS web service and return the report as PDF, etc.
Or you can set the RS up to use Forms Authentication and have your users go
directly there:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ufairs.asp
--
Adrian M.
MCP
"pepcag" <pepcag@.discussions.microsoft.com> wrote in message
news:6F030717-3E37-40D2-B5D4-3AF49338DF27@.microsoft.com...
>I am creating a web appliction to access Reporting Service, but I got some
> problem
> 1. User loges on web application via Forms Authentication
> 2. User types in report parameters.
> 3. Program gets all parameters, then call Reporting Server URL to get
> report.
> It works fine with intranet, but it doesn't work with internet, because
> the
> reporting service uses Windows Authentication. I don't want allow
> Anonymous
> access Reporing service.
> What should I do?