Hi. I'm trying do do some communication between CMS and Sharepoint portal server 2003. my code looks like this. --------------- HttpWebRequest wr = (HttpWebRequest)HttpWebRequest.Create(myURL); CredentialCache wrCache = new CredentialCache(); wrCache.Add(new Uri(myURL),"NTLM", (NetworkCredential)CredentialCache.DefaultCredentials); wr.PreAuthenticate = true; wr.Credentials = wrCache; WebResponse wrsp; try { wrsp = wr.GetResponse(); } catch(Exception ex) { throw new Exception("Error during call to provider:\n" + ex.Message); } ------------------ both servers are set up with only integrated authentication. the user wich is logged on has access o both servers. there is no double hop in the call. Still i get a 401 unauthorized access from the call. I also tried just using the defaultCredentials without making a new credentialcache.got the same result. if i hardcode a username, password and domain into a new credentialcache, it works. If i place a breakpoint and look at the contens of the defaultcredentials, the username is blank. Is this normal?:confused: if i hardcode a new credentialcache the username is not blank. Any ideas?
troels_sorensen
Posts
-
Credentials -
change webservice url runtimefound a solution here: http://www.c-sharpcorner.com/Code/2004/Feb/GenericWebServiceProxy.asp
-
change webservice url runtimeHi. I'm thinking about doing a component that calls a webservice to get xml, applies a XSL to it and renders out HTML. I have an example now that works. not too hard really. Now I want to be able to let the user provide a xsl to use. This also works fine. To make it truly reusable i also want to let the use enter the url of a webservice to call and the webservice method to use. Now, how the h... do I accomplish this? I really have no idea...:confused:
-
access <HEAD> from codebehindHi. Is it possible to access and add a line to the htmlheader tag from the codebehind?
-
how to make messenger-like messageboxHi. Can anyone tell me or point me to a HOWTO on making messager-like messageboxes? A have a win app in which i would like to show some notifications to the user when something occurs, but without disturbing the user. I want to do this the same way that messenger does it when you fx have a new mail or when some friend logged in. How do i do this? \Regards finger
-
Send file to ClientI found I solution my self: byte[] theData = theDoc.GetData(); Page.Response.ContentType = "application/pdf"; Page.Response.AppendHeader("content-disposition", "attachment; filename=MyPDF.PDF"); Page.Response.AppendHeader("content-length", theData.Length.ToString()); Page.Response.BinaryWrite(theData);
-
Send file to ClientHi. I'm using a third party made module to generate pdf files. The user clicks a button, The code generates a pdf i memory and now a want to be able to send the pdf as a file to the client in a way where he gets the popup where he can choose to view or save the file. When the pdf file is ready (in memory) I can use 2 methods. one to write the file physically to disk (to a Path or to a filestream) or one to get the file as a byte[]. I want to send the file to the client _without_ first writing the file to disk. I've bee trying to do this with a filestream and Response.WriteFile. But this results in nothing happens. If I write the file to disk first and the reload it in Response.WriteFile, then it works. So the question is: How can I send a file that is not on disk (only i memory) to the client without writing the file to disk?
-
.NET based HTML to PDF converterHi. I'm curently on a larger project where we need at tool that can take convert a webpage into a pdf document. We want to be able to give a html page that is "printer friendly" and have it convert it into a pdf page. It has to be .NET based and _must_ support CSS. The price is not important. Is there anyone outthere that knows of any good tools?
-
.NET based HTML to PDF converterHi. I'm curently on a larger project where we need at tool that can take convert a webpage into a pdf document. We want to be able to give a html page that is "printer friendly" and have it convert it into a pdf page. It has to be .NET based and _must_ support CSS. The price is not important. Is there anyone outthere that knows of any good tools?
-
good rescources on Sharepoint developmentYeah... documentation.... guess I'll just have to guess then, since microsoft wants it that way. Looking forward to the new version! Thanks for the link.
-
good rescources on Sharepoint developmentok. Thanks
-
good rescources on Sharepoint developmentHi. I'm new to the Sharepoint portal server 2003 (or any other sharepoint for that matter) and I need to get to know how to develop stuff for it. I've messed around a bit with building webparts and now I want to know how to make custom lists. However i'm having trouble finding any good rescources on the subject. Is there anyone here that can point me to some good forums/guides/tutorials/SDK's/etc. ? p.s. I have been through MSDN and I don't seem to be able to find anything other than developing webparts there.
-
good rescources on Sharepoint developmentHi. I'm new to the Sharepoint portal server 2003 (or any other sharepoint for that matter) and I need to get to know how to develop stuff for it. I've messed around a bit with building webparts and now I want to know how to make custom lists. However i'm having trouble finding any good rescources on the subject. Is there anyone here that can point me to some good forums/guides/tutorials/SDK's/etc. ? p.s. I have been through MSDN and I don't seem to be able to find anything other than developing webparts there.
-
catch tabpage changeHi. I just tried this and it works just fine. Great :) However, it is still possible to change the tab by pressing the default shortcutkey (ctrl + tab). I want to be able to control this too. My guess is that all I have to do is add a check do compare to a different messagenumber. Is this correct? If so, Do you have a link to som docs where I can find this number? I would also like to know if it is possible to detect which tabpage he pressed. for example: If the user is on tabpage1, he can go to tabpage 2 but NOT to tabpage 3. To be able to do this, I need to know which tabpage he clicked Thanks so far.
-
catch tabpage changeHi. How can i prevent a user from changing tabpage without removing tabpages and without the flicker that occurs if i in the selectedIndexChanged event set it back to the original tabpage? It seems that all events a raised AFTER the tabpage changed.... even the various mouse events...
-
pictures in a datagridHow can I in my winform display picture or icons in one of the columns in my datagrid?
-
WinForms: SuspendLayout on ApplicationHi. I just found the wonderfull SuspendLayout Method on the WinForm class.:cool: I was wondering if there is a similar feature to susoend the layout for the whole Application in multible forms, without doing it on every single form? Something like Application.SuspendLayout();;) Any ideas or suggestions?
-
printing with CrystalReportsViewerIt looks like you are right. :sigh: Thanks anyway.:|
-
Increase Printing Speed.NET sends _all_ data to a printer using Raster images. This means if you only send plain taxt to a printer, it still converts it into a raster image. If you communicate with the printer via the Serial port it takes quite a while. If you only want to send text you can develop a component in VB (VS 6.0) that sends plain text to a printer and use this in .NET. can't help with the image though...
-
Serial port commsthere are no .NET library to use for this. You have another couple of options. Use a component from VS 6.0: http://www.devhood.com/tutorials/tutorial\_details.aspx?tutorial\_id=320 OR use the win32 API: http://msdn.microsoft.com/msdnmag/issues/02/10/NETSerialComm/default.aspx