Click here to Skip to main content
15,914,642 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multiple Field Sorting C# Pin
dsrao18-Jul-09 9:13
dsrao18-Jul-09 9:13 
QuestionProcess.workingset Pin
hpydir17-Jul-09 14:53
hpydir17-Jul-09 14:53 
AnswerRe: Process.workingset Pin
Luc Pattyn17-Jul-09 15:03
sitebuilderLuc Pattyn17-Jul-09 15:03 
Questionhelp Pin
unlucky_dreamer17-Jul-09 12:45
unlucky_dreamer17-Jul-09 12:45 
AnswerRe: help Pin
DaveyM6917-Jul-09 13:20
professionalDaveyM6917-Jul-09 13:20 
GeneralRe: help Pin
Michael Schubert17-Jul-09 22:06
Michael Schubert17-Jul-09 22:06 
QuestionMS Word Automation - Combining word documents Pin
venadder17-Jul-09 11:25
venadder17-Jul-09 11:25 
QuestionDelegates - I don't Get It Pin
eddieangel17-Jul-09 7:52
eddieangel17-Jul-09 7:52 
AnswerRe: Delegates - I don't Get It Pin
harold aptroot17-Jul-09 8:14
harold aptroot17-Jul-09 8:14 
AnswerRe: Delegates - I don't Get It Pin
CodingYoshi17-Jul-09 8:20
CodingYoshi17-Jul-09 8:20 
GeneralRe: Delegates - I don't Get It Pin
eddieangel17-Jul-09 8:35
eddieangel17-Jul-09 8:35 
GeneralRe: Delegates - I don't Get It Pin
DaveyM6917-Jul-09 10:47
professionalDaveyM6917-Jul-09 10:47 
GeneralRe: Delegates - I don't Get It Pin
eddieangel17-Jul-09 11:00
eddieangel17-Jul-09 11:00 
GeneralRe: Delegates - I don't Get It Pin
DaveyM6917-Jul-09 11:26
professionalDaveyM6917-Jul-09 11:26 
GeneralRe: Delegates - I don't Get It Pin
DaveyM6917-Jul-09 11:39
professionalDaveyM6917-Jul-09 11:39 
AnswerRe: Delegates - I don't Get It Pin
Luc Pattyn17-Jul-09 10:13
sitebuilderLuc Pattyn17-Jul-09 10:13 
GeneralRe: Delegates - I don't Get It Pin
Baeltazor17-Jul-09 22:28
Baeltazor17-Jul-09 22:28 
QuestionCrystalReports Pin
CodingYoshi17-Jul-09 7:06
CodingYoshi17-Jul-09 7:06 
AnswerRe: CrystalReports Pin
Adam R Harris17-Jul-09 9:20
Adam R Harris17-Jul-09 9:20 
GeneralRe: CrystalReports Pin
Adam R Harris17-Jul-09 10:41
Adam R Harris17-Jul-09 10:41 
GeneralRe: CrystalReports Pin
CodingYoshi17-Jul-09 10:54
CodingYoshi17-Jul-09 10:54 
QuestionCommon components in C# and .net? Pin
saxisa17-Jul-09 7:01
saxisa17-Jul-09 7:01 
QuestionNTLM Authentication in C# Pin
joana.simoes17-Jul-09 5:39
joana.simoes17-Jul-09 5:39 
Hello,
I have a server with Windows Authentication enabled and I was trying to throw a request in c# to access it. My code looks like this:


webRequest = WebRequest.Create(myURL);
webRequest.Credentials = CredentialCache.DefaultCredentials;
webResponse = webRequest.GetResponse();



However, this is throwing an error:

System.Net.WebException: The request was aborted: The request was canceled. ---> System.FormatException: Invalid length for a Base-64 char array.
at System.Convert.FromBase64String(String s)
at System.Net.NTAuthentication.GetOutgoingBlob(String incomingBlob)
at System.Net.NegotiateClient.DoAuthenticate(String challenge, WebRequest webRequest, ICredentials credentials, Boolean preAuthenticate)
at System.Net.NegotiateClient.Authenticate(String challenge, WebRequest webRequest, ICredentials credentials)
at System.Net.AuthenticationManager.Authenticate(String challenge, WebRequest request, ICredentials credentials)
at System.Net.AuthenticationState.AttemptAuthenticate(HttpWebRequest httpWebRequest, ICredentials authInfo)
at System.Net.HttpWebRequest.CheckResubmitForAuth()
at System.Net.HttpWebRequest.CheckResubmit(Exception& e)
at System.Net.HttpWebRequest.DoSubmitRequestProcessing(Exception& exception)
at System.Net.HttpWebRequest.ProcessResponse()
at System.Net.HttpWebRequest.SetResponse(CoreResponseData coreResponseData)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()

I am specially intrigued by the " Invalid length for a Base-64 char array." message. Does anybody have any ideas on what may be causing this?
I have to add that my webserver is *not* IIS. These are the http headers that the server responds with:

HTTP/1.1 401 UNAUTHORIZED
Content-Length: 25
Content-Type: text/plain; charset=UTF-8
Server: GeognoSIS/7.1.135.0 (Alpha)
WWW-Authenticate: Negotiate
X-Cadcorp-GeognoSIS-Licence: {"Vendor Information":"Debug-only unlicensed version"}

0.01s
GET /GoogleMapsService/GM.serv?REQUEST=getCapabilities&alloverlays=true HTTP/1.1
Authorization: Negotiate TlRMTVNTUAABAAAAt7II4gMAAwAuAAAABgAGACgAAAAGAHEXAAAAD0RFVjMwOURFVg==
The thread '_threadstartex' (0x6cc) has exited with code 0 (0x0).
Host: dev309.dev.cadcorp.net:4326

HTTP/1.1 401 UNAUTHORIZED
Content-Length: 25
Content-Type: text/plain; charset=UTF-8
Server: GeognoSIS/7.1.135.0 (Alpha)
WWW-Authenticate: Negotiate TlRMTVNTUAACAAAABgAGADgAAAA1woniyuFg72yjZX2QNQMCAAAAAJYAlgA+AAAABgBxFwAAAA9EAEUAVgACAAYARABFAFYAAQAMAEQARQBWADMAMAA5AAQAHgBEAGUAdgAuAGMAYQBkAGMAbwByAHAALgBuAGUAdAADACwARABFAFYAMwAwADkALgBEAGUAdgAuAGMAYQBkAGMAbwByAHAALgBuAGUAdAAFABYAYwBhAGQAYwBvAHIAcAAuAG4AZQB0AAcACACud9kb5wbKAQAAAAA
X-Cadcorp-GeognoSIS-Licence: {"Vendor Information":"Debug-only unlicensed version"}

Also, I have to add that I am able to fire successfully the request in IE, so I was guessing there is some problem with the DefaultCredentials...
Any suggestions or comments would be really appreciated!
Thanks in advance,
Regards,
Jo
AnswerRe: NTLM Authentication in C# Pin
Adam R Harris17-Jul-09 9:25
Adam R Harris17-Jul-09 9:25 
GeneralRe: NTLM Authentication in C# Pin
joana.simoes19-Jul-09 23:34
joana.simoes19-Jul-09 23:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.