Groups | Blog | Home
all groups > sql server reporting services > december 2005 >

sql server reporting services : How to avoid windows login prompt (Help Pls!!!!!)


Nayan
12/28/2005 6:02:02 PM
I am trying the following code in my ASP.net page to pass network credentials
to the ReportServer.
This code renders the report without any problem but for some reason after
rendering the report it also prompt windows login prompt Is this a known bug
with RS ???

--// Code //--

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
' Create Web proxy object and set credentials
Dim rs As New RSWebService.ReportingService
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
'//rs.Credentials = New System.Net.NetworkCredential("username",
"mypassword", "mydomain")

' Render the report as an HTML4.0 fragment using the Web service
Dim results As [Byte]()
results = rs.Render("/SampleReports/Company Sales", "HTML4.0", Nothing,
"<DeviceInfo><HTMLFragment>True</HTMLFragment></DeviceInfo>", Nothing,
Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing)

' Write the results to the current Web page
Response.BinaryWrite(results)
End Sub



Thanks ......

--
Nayan Patel (MCSE, MCDBA, MCSD.net)
www.binaryworld.net
A Powerful Knowledge Sharing Platform

Nayan
12/28/2005 6:27:02 PM
Thank you very much for the prompt reply... I think you are right coz this
report has some images but now I dont know which property to set so it just
use the same credentials.

Any idea ???


--
Nayan Patel (MCSE, MCDBA, MCSD.net)
www.binaryworld.net
A Powerful Knowledge Sharing Platform




[quoted text, click to view]
Jéjé
12/28/2005 9:09:33 PM
maybe there is some access to javascripts or image rendered into the report
which access the /reportserver folder.
this cause the user to type a login/password.
(look at the HTML generated to see if there is any reference to an image
outside your application)

you have to add some redering properties to setup the web page to render
these sub-requests.
I don't remember the code.

[quoted text, click to view]

Sorcerdon
12/29/2005 6:33:18 AM
You dont need all that.

Go to report manager.
Go to Data Sources --> Create a New data source... Give it a legit
connection string and login name.
Then go to the report in report manager and go to the properties
section and click on data sources
Select Use a Shared Data Source then browse and find that data source
you just created under the data source directory.
Click ok
Click Apply - ALWAYS forget this one ^_^

and there you go, now no one has to log in ever again...(Make sure you
set DONT OVERWRITE DATA Sources in the report options)

regards,

Stas K.
Jéjé
12/29/2005 11:35:19 AM
you have to modify your code to tell RS to use your own image generator
instead-of the default /reportserver based.

you have to play with the renderstream function
renderstream is designed to render a report image.

there is many way to do this.
you can render each image and store it on a local folder which is available
to the end user through a virtual directory.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_ref_soapapi_service_lz_49f6.asp?frame=true

or you can store each stream in the user session object and render the
stream using your own ASPX page (like RenderImage.aspx?Streamid=XXXX)
there is other options.


[quoted text, click to view]

AddThis Social Bookmark Button