Click here to Skip to main content
15,895,557 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: NTLM Authentication in C# Pin
joana.simoes19-Jul-09 23:50
joana.simoes19-Jul-09 23:50 
AnswerRe: NTLM Authentication in C# Pin
joana.simoes20-Jul-09 3:30
joana.simoes20-Jul-09 3:30 
QuestionRichTextBox- :(( Pin
RongNK17-Jul-09 4:49
RongNK17-Jul-09 4:49 
AnswerRe: RichTextBox- :(( Pin
Manas Bhardwaj17-Jul-09 4:59
professionalManas Bhardwaj17-Jul-09 4:59 
GeneralRe: RichTextBox- :(( Pin
RongNK17-Jul-09 5:04
RongNK17-Jul-09 5:04 
GeneralRe: RichTextBox- :(( Pin
Manas Bhardwaj17-Jul-09 5:14
professionalManas Bhardwaj17-Jul-09 5:14 
GeneralRe: RichTextBox- :(( Pin
RongNK17-Jul-09 5:39
RongNK17-Jul-09 5:39 
GeneralRe: RichTextBox- :(( Pin
DoctorMick17-Jul-09 6:19
DoctorMick17-Jul-09 6:19 
AnswerRe: RichTextBox- :(( Pin
Luc Pattyn17-Jul-09 10:07
sitebuilderLuc Pattyn17-Jul-09 10:07 
QuestionControl Timer is not work ?? Pin
anhhuynokia17-Jul-09 4:17
anhhuynokia17-Jul-09 4:17 
AnswerRe: Control Timer is not work ?? Pin
musefan17-Jul-09 4:25
musefan17-Jul-09 4:25 
AnswerRe: Control Timer is not work ?? Pin
ddecoy17-Jul-09 4:27
ddecoy17-Jul-09 4:27 
AnswerRe: Control Timer is not work ?? Pin
OriginalGriff17-Jul-09 4:27
mveOriginalGriff17-Jul-09 4:27 
AnswerRe: Control Timer is not work ?? Pin
Luc Pattyn17-Jul-09 10:29
sitebuilderLuc Pattyn17-Jul-09 10:29 
GeneralRe: Control Timer is not work ?? Pin
anhhuynokia17-Jul-09 18:06
anhhuynokia17-Jul-09 18:06 

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.