How To Persist Cookie Through HttpWebRequest In CLR? Thanks

Mar 20, 2007

I put HttpWebRequest in a CLR so I can call website in my SQL. In same calls, I need pass cookies from the previous call to the next call. So I am thinking I can do this in two ways:

1, store the cookiecontainer somewhere , but not sure if CLR allow me to do that ,

2, return the cookiecontainer, and send it to the next call from SQL, this way I need use cookie string, is there a function to serialize a cookiecontainer?



thanks

View 2 Replies


ADVERTISEMENT

How To Use A Cookie As An Input Parameter In Sqldatasource?

Apr 8, 2008

i created a cookie as follows
 HttpCookie myCookie = new HttpCookie("Portal");
myCookie["EMail_ID"] = Email_ID;myCookie["Role"] = Role_ID.Value.ToString();myCookie.Expires = DateTime.Now.AddMinutes(1);
Response.Cookies.Add(myCookie);
 
Now i have to take the"EMail_ID" as input parameter in sqldatasourse.
 
<asp:SqlDataSource ID="SqlDS_DC_List" runat="server" ConnectionString="<%$ ConnectionStrings:EnR_Portal_ConnectionString %>"
SelectCommand="proc_DC_List" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:CookieParameter CookieName=" " Name="Email_ID" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
 
how can i specify Email ID as cookie name?
 
 

View 11 Replies View Related

Dynamic SQL String With Cookie Request

Jun 12, 2008

Hi,is it possible to build a SQL SELECT COMMAND with a Cookie Request in between a IF ELSE Loop?My idea is to change the  SQL SELECT COMMAND depending to a cookie.Is there any help or tutorial that somebody can suggest? caspar.netcologne, germany, EU 

View 7 Replies View Related

User Profile Using Sql&#043; Getting Data From Cookie

Sep 24, 2007

does anyone know how i can make it so you can view all the users in the database on a page and there names are clickable with a link and then shows there profile page which is basicly a text box that all users can edit there own.

i have a "users" table and mysite stores there username in a cookie called user for the session.

any help will be very very grateful

View 1 Replies View Related

Unable To Retrieve RSAuthenticationHeader Cookie

Jan 3, 2008

I am trying to setup custom forms authentication in Reporting Services.

I have followed the UFAIRS sample. I have the site running, reporting services running, and I have a page where I can input my login information.

I can debug the code- and I get to this section of code:


Protected Overrides Function GetWebResponse(ByVal request As WebRequest) As WebResponse


Dim response As WebResponse = MyBase.GetWebResponse(request)

Dim cookieName As String = response.Headers("RSAuthenticationHeader")

' If the response contains an auth header, store the cookie

If Not (cookieName Is Nothing) Then

Utilities.CustomAuthCookieName = cookieName

Dim webResponse As HttpWebResponse = CType(response, HttpWebResponse)

Dim authCookie As Cookie = webResponse.Cookies(cookieName)

' If the auth cookie is null, throw an exception

If authCookie Is Nothing Then

Throw New Exception("Authorization ticket not received by LogonUser")

End If

' otherwise save it for this request

Me.AuthCookie = authCookie

' and send it to the client

Utilities.RelayCookieToClient(authCookie)

End If

Return response


Notice the line: Dim cookieName As String = response.Headers("RSAuthenticationHeader")

Basically the cookie name is null after that, and therefore it processes no further and I never get a cookie and I can never authenticate. Any thoughts as to what I am doing wrong?


Also, this is on a test box, so I don't have SSL capabilities. Unless there is a way to "emulate" SSL, I pretty much don't know if this works without SSL, or if this is causing the problem. We have environments that use SSL, but I do not have access to it at the moment- I will have to do additional work to get that up and running.

Thanks in advance,
Robert

View 1 Replies View Related

Persist ConnectionString

Apr 3, 2007

Hello All,



I have changed connection string property of connectionmanger at runtime and saved package.But my new connectionstring is not persisting, i am getting my old connection string after reload package .



ConnectionManager cm = package.Connections[test.ConnectionManagerID];



cm.ConnectionString = @"C:Test.csv";



app.SaveToDtsServer(package, null,

@"File SystemDupaco Load Next Best.dtsx", "CIRCLE");



How can I save new connection string?.



Please help me.





Thanks



Subin

View 1 Replies View Related

Persist Progress Tab?

Mar 24, 2006

is there a way to capture what gets written to the progress tab to a table, or is it overwritten on each execution as xml somewhere so it can be saved kind of like an odometer? the mission is to be able to audit the results of a load, or even if it doesnt turn out to be a load, then document the run.

similarly, is there a way to watch what executes to see what actually runs during a merge join transform, iow, something that exposes ssis to trace? how do i find it?

thanks

drew

View 2 Replies View Related

Errors Persist In New Database(s)

Apr 19, 2008

I am getting this error condition on two different machines, so I think it is something I am leaving out. The database is being created with a script (pasted at end of this post) executed within SQL Management Express 2005. The database shows up in the database tree but is not expandable, i.e. no plus sign. If I try to get Properties, the following sequence:Database cannot be opened due to inaccessible files or insufficient memory or disk space Error 945 TITLE: Microsoft SQL Server Management Studio Express------------------------------Cannot show requested dialog.------------------------------ADDITIONAL INFORMATION:Cannot show requested dialog. (Microsoft.SqlServer.Express.SqlMgmt)------------------------------An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)------------------------------Database 'Cart1' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details. (Microsoft SQL Server, Error: 945)For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=945&LinkId=20476==============================================I had been using "Cart" as the name, saw a reference that said not to use the same name in a new database. The new name is "Cart1"; no help.In the application,  I initially get the "cannot find the physical file, but if I Refresh the page, I get: "Cannot open database "Cart1" requested by the login. The login failed. Login failed for user 'GW20Bob'Please assist in this. I will test or answer any questions I haven't supplied.This and associated files are from Build Your Own ASP.NET 2.0 Web Site Using CSharp And VB by Doug Lowe if anyone is familiar without.Script======USE masterGOCREATE DATABASE Cart1ON (NAME=Cart,    FILENAME = 'C:APPApp_DataCart1.mdf',    SIZE=10 )GOUSE Cart1CREATE TABLE Categories (  catid VARCHAR(10)  NOT NULL,  name  VARCHAR(50)  NOT NULL,  [desc]  VARCHAR(MAX) NOT NULL,  PRIMARY KEY(catid) )  GOCREATE TABLE Products (  productid VARCHAR(10)  NOT NULL,  catid     VARCHAR(10)  NOT NULL,  name      VARCHAR(50)  NOT NULL,  shorttext VARCHAR(MAX) NOT NULL,  longtext  VARCHAR(MAX) NOT NULL,  price     MONEY        NOT NULL,  thumbnail VARCHAR(40)  NOT NULL,  image     VARCHAR(40)  NOT NULL,  PRIMARY KEY(productid),   FOREIGN KEY(catid) REFERENCES Categories(catid) )  GOCREATE TABLE FeaturedProducts (  productid   VARCHAR(10)  NOT NULL,  featuretext VARCHAR(MAX) NOT NULL,  saleprice   MONEY        NOT NULL,  PRIMARY KEY(productid),  FOREIGN KEY(productid) REFERENCES Products(productid) )  GO    CREATE TABLE Customers (  email     VARCHAR(50)  NOT NULL,  lastname  VARCHAR(50)  NOT NULL,  firstname VARCHAR(50)  NOT NULL,  address   VARCHAR(50)  NOT NULL,  city      VARCHAR(50)  NOT NULL,  state     VARCHAR(2)   NOT NULL,  zipcode   VARCHAR(9)   NOT NULL,  phone     VARCHAR(20)  NOT NULL,  PRIMARY KEY(email) )  GO    CREATE TABLE Orders (  ordernum  INT           IDENTITY,  orderdate SMALLDATETIME NOT NULL,  custemail VARCHAR(50)   NOT NULL,  subtotal  MONEY         NOT NULL,  salestax  MONEY         NOT NULL,  shipping  MONEY         NOT NULL,  total     AS (subtotal + salestax + shipping),  PRIMARY KEY(ordernum),   FOREIGN KEY(custemail) REFERENCES Customers(email) )  GO    CREATE TABLE OrderItems (  ordernum  INT          NOT NULL,  productid VARCHAR(10)  NOT NULL,  name      VARCHAR(50)  NOT NULL,  price     MONEY        NOT NULL,  quantity  SMALLINT     NOT NULL,  total     AS (price * quantity),  PRIMARY KEY(ordernum, productid),   FOREIGN KEY(ordernum) REFERENCES Orders(ordernum),  FOREIGN KEY(productid) REFERENCES Products(productid) )  GO

View 2 Replies View Related

Do Pass Thru Query Connections Persist?

Oct 18, 2006

I have an Access 2003 front end with a SQL Server 2005 Express backend. I was thinking of using pass thru queries as row sources for some combo boxes such as states/countries for addresses. My question is do pass thru queries, when used as a row source, keep a connection to the DB server? Or do they get the data, disconnect and populate the control?

I realize I could populate the controls with code, but this seems less hassle and will overcome the ValueList size limit if needed.

View 9 Replies View Related

Can SQL Service Broker Persist Requests?

May 17, 2007

I have a scenario where we want something like a message bus. We can have multiple clients sending in events and would like a way to

i) persist those events

ii) Send out the notifications to the subcribers (this would be some C# services)



What is the best way to do this? I know that we can build something from scratch using WCF Publish-Subscribe. But i was interested in knowing if I can leverage SQL Service Broker to do the work.



View 8 Replies View Related

RS 2000, Forms Authentication, Argument Exception Adding Auth Cookie To The Web Request For Graph

Jan 16, 2007

Hello, I have run into a strange problem with RS 2000. I have a base class that will call a reporting server web service, render a report to pdf, then write the report output to the stream. This has worked fine for me for reports.

However, when I render a graph to pdf, I get the following exception:

[ArgumentException: cookie.Domain]

System.Net.CookieContainer.Add(Cookie cookie) +583
Learning.Common.Reporting.ReportServerProxy.GetWebRequest(Uri uri)

...

I only get this exception in our staging environment, not locally.

Here is a code snippet from the ReportServerProxy class, but it is pretty textbook according to the MSDN samples..

public class ReportServerProxy : ReportingService {
protected override WebRequest GetWebRequest(Uri uri) {
HttpWebRequest request;
request = (HttpWebRequest)HttpWebRequest.Create(uri);
// Create a cookie jar to hold the request cookie
CookieContainer cookieJar = new CookieContainer();
request.CookieContainer = cookieJar;
Cookie authCookie = AuthCookie;
// if the client already has an auth cookie
// place it in the request's cookie container
if (authCookie != null){
request.CookieContainer.Add(authCookie);
}
...

}


As I said, I can run reports one after another without issue, graphs are causing me problems.

View 1 Replies View Related

How To Persist Title Of 'modal Dialog' During Postback

Oct 18, 2007

Hi,

Please give me some idea to persist or set title of modal dialog during postback.

The title of modal dialog is going lost whenever postback happen on modal dialog.

document.title is not working after postback.


Thanks,
Sandeep, India

View 1 Replies View Related

FTP Authentication Information Does Not Persist When Deploying Packages

Jan 18, 2006

I am trying to deploy a SSIS package which includes a FTP task. It works fine on the machine it was developed . When deploying the package on a production server, all other config changes work, but the FTP task is failing, with authentication error.



any help on how to persist the data would be appreciated

thanks

View 1 Replies View Related

Advanced Editor Randomly Fails To Persist New Column Width

Sep 4, 2007

This one has set me back many, many hours on this project; it's about got me ready to dump SSIS & just roll a custom .NET solution in C#.

I need to create import packages for quite a few very wide flat files (130 - 180+ columns, not my design). Many of these columns have data > 50 characters long.

I change column widths on the data flow source using the Advanced Editor, via Input and Output Properties ==> Flat File Source Output ==> External Columns.

About 50% of the time, the changes vanish after clicking OK to dismiss the Advanced Editor. There is no warning message or output announcing that the editor failed to persist its changes, or that it set some columns' properties back to the defaults, or why. The column's widths just silently revert back to 50.

If the cause and resolution aren't known, does anyone know of a way to accomplish any of the following workarounds?


Create a data source connection by importing an external text schema defining the flat file's column names, data types and sizes, or
Change a property on multiple source columns en-masse, or...

Get at a text version of the file containing the Data Flow Component's definition, so we can edit wide import schemas without racking up thousands of mouse-clicks?Thanks! A virtual cheeseburger to anyone with answers.

View 7 Replies View Related

SQL 2012 :: Persist Security Info And Integrated Security In Connection String

Dec 4, 2014

I use from sql server 2008. and c#

what is the best connectionstring?

I don't know if i use Persist Security Info and Integrated Security or not?

And if yes then their value must be true or false?

View 1 Replies View Related

Differance Between Persist Security Info And Integrated Security

Apr 26, 2007

hi i want to know what is the differance between  
Persist Security Info=False;Integrated Security=Yes;

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved