Showing posts with label model. Show all posts
Showing posts with label model. Show all posts

Tuesday, March 20, 2012

change datasource with sqlReportingService2005 class

hi pro , i created model project with .net 2005 after that , create report with reportbuilder that it use this model. it s ok.

i have project and i want to change datasource (connection string ) in runtime when User click on report ,i use sqlReportingService2005 class :

Dim rs As New ReportingService2005()

rs.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim definition As New DataSourceDefinition()
definition.CredentialRetrieval = CredentialRetrievalEnum.Integrated
definition.ConnectString = "Data Source=" & serverName & ";Initial Catalog=" & DataBaseName & ";Integrated Security=True"
definition.Enabled = True
definition.EnabledSpecified = True
definition.Extension = "SQL"
definition.ImpersonateUser = False
definition.ImpersonateUserSpecified = False ' True
definition.Prompt = Nothing
definition.WindowsCredentials = True ' False

Try
rs.SetDataSourceContents("/Data Sources/" & DataSourceName, definition)

Catch ex As SoapException
Console.WriteLine(ex.Detail.OuterXml)
End Try
End Sub

error "An unhandled exception of type 'System.Net.WebException' occurred in System.Web.Services.dll

Additional information: The request failed with HTTP status 404: Object Not Found." happend

( i checked Enable Unmanged code debugging =true)

please help me

tanks

This error occurs only when the report server URL is given wrong or does not exists. Do check your report server URL assigned to the rs.Url property.

|||

tanks for reply. i was forgotten to say : i have 2 machin ,the first one uses Windows 2003 Server and i installed sql server on it , another machin uses windows a xp and i run project on it( it s like client). when i take project on sql server 2005 it s work nice but when i run project on xp it dosent work.

|||

Are you able to open the report server url in browser?

Saturday, February 25, 2012

Certificates expiration Date

Hi There

This may seem like a stupid question but i am trying to get the hang of the new security model.

I have not really heard anything mentioned about certficate expiration date when it comes to creating certificates for keys or service broker endpoints etc.

We have created certificates for keys and service broker endpoints, now what exactly happens when the expiration date, by default 1 year i think is reached, will we no longer be able to decrypt encrypted data and will the service broker endpoints stop working etc ?

Or is this expiration date when the certificate can no longer be used to create security objects ? And all security objects already created with this certificate will always work ?

In other words is there ever danger that keys and endpoints or basically any object referrencing this certificate will just suddenly stop working one day, or will all objects work indefinately regardless of an certificate/objects expiration date ?

Thanx

The certificate expiration date is not enforced by SQL Server directly. These certificates can still be used for data encrypting, decrypting, signing, verifying signatures or object creation/usage in SQL Server.

Service Broker will honor the expiration date and after a certificate has expired it cannot be used (See “Certificates for Dialog Security” http://msdn2.microsoft.com/en-us/library/ms166117.aspx ).For more information on Service broker usage of certificates I would recommend to visit Service Broker Conversations webpage at http://blogs.msdn.com/remusrusanu/.

While SQL Server itself will not prevent you from using an expired certificate, it is up to the application developers to enforce or suggest the expiration, and use the available usage of expired certificates as a disaster recovery tool rather than as a rule. I strongly recommend generating new certificates to substitute expired ones.

Thanks,

-Raul Garcia

SDE/T

SQL Server Engine