Click here to Skip to main content
15,887,267 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: response.Cookies Pin
ZurdoDev15-Jan-15 3:52
professionalZurdoDev15-Jan-15 3:52 
GeneralRe: response.Cookies Pin
AbdelrhmanRaafat15-Jan-15 4:29
AbdelrhmanRaafat15-Jan-15 4:29 
Questionconnection database use ado.net in mvc Pin
Nguyen Jay13-Jan-15 5:18
Nguyen Jay13-Jan-15 5:18 
AnswerRe: connection database use ado.net in mvc Pin
Afzaal Ahmad Zeeshan13-Jan-15 10:23
professionalAfzaal Ahmad Zeeshan13-Jan-15 10:23 
QuestionQuiz for Certification Pin
Member 1061043212-Jan-15 17:46
Member 1061043212-Jan-15 17:46 
SuggestionRe: Quiz for Certification Pin
Richard MacCutchan12-Jan-15 21:47
mveRichard MacCutchan12-Jan-15 21:47 
AnswerRe: Quiz for Certification Pin
Anurag Gandhi15-Jan-15 5:39
professionalAnurag Gandhi15-Jan-15 5:39 
QuestionUsing a SERVICE Reference vs WEB Reference, with endpoint behavior to alter SOAP request header Pin
jkirkerx12-Jan-15 11:39
professionaljkirkerx12-Jan-15 11:39 
I have this Card Processing WSDL. I made a service reference and a web reference for the WSDL.

Long story short, I've only done WSDL once for FedEx, so this is new to me. The FedEx was cut and dry, just make a WEB Reference, and code to it.

This one, the First Data is much more complex. So I made a SERVICE Reference, and coded to it.
You have to generate a EndPoint Behavior, so you can calculate the HMAC data, and attach it to the SOAP request header. That part was fairly easy. I figured out how to call the service, but then I get this error

The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was ''.

OK I get it. With a Service Request, you sort of have to be in the same domain, perhaps a web server that runs IIS as well. Where as a WEB Request, you can go cross domain.

So my question is, is there a way to cheat the credentials, using the SERVICE Reference, and continue using this method, or use the WEB Reference, and create a new method of endpoint behavior.

Trouble with the first, is that I really don't want to hard code credentials.
Trouble with the latter, is that I have no clue on how to add a endpoint behavior to the WEB Reference.
What would you do?

Here's some code for to satisfy curiosity for SERVICE Reference
'Bind the transaction to the HMAC Header Behavior
Dim httpBinding As BasicHttpBinding = New BasicHttpBinding()
httpBinding.Security.Mode = SecurityMode.Transport
httpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows
httpBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName
httpBinding.Security.Message.AlgorithmSuite = ServiceModel.Security.SecurityAlgorithmSuite.Basic256

Dim ws = New firstData_v14.ServiceSoapClient(httpBinding, New EndpointAddress(m_endPoint_Url))
ws.ClientCredentials.Windows.ClientCredential = New NetworkCredential("username", "password", "domain")
ws.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation
ws.ChannelFactory.Endpoint.Behaviors.Add(New HMAC_SR_Header_Behavior(m_key, m_keyID, m_endPoint_Uri))

'Transmit the Card Authorization Request
rxn = New firstData_v14.TransactionResult
rxn = ws.SendAndCommit(txn)


WEB Reference
'Bind the transaction to the HMAC Header Behavior
Dim ws = New com.firstdata.globalgatewaye4.V14.Service

'Transmit the Card Authorization Request
rxn = New com.firstdata.globalgatewaye4.V14.TransactionResult
rxn = ws.SendAndCommit(txn)

GeneralI'm reformulating my question here Pin
jkirkerx12-Jan-15 12:33
professionaljkirkerx12-Jan-15 12:33 
Questioninserting data in an excel file using ASP.NET (VB) Pin
John_Reese12-Jan-15 4:54
John_Reese12-Jan-15 4:54 
AnswerRe: inserting data in an excel file using ASP.NET (VB) Pin
John_Reese12-Jan-15 5:29
John_Reese12-Jan-15 5:29 
QuestionChanging Resource files programmatically in ASP.Net 4.5 Pin
meeram3912-Jan-15 0:48
professionalmeeram3912-Jan-15 0:48 
AnswerRe: Changing Resource files programmatically in ASP.Net 4.5 Pin
Afzaal Ahmad Zeeshan12-Jan-15 4:26
professionalAfzaal Ahmad Zeeshan12-Jan-15 4:26 
QuestionNeed to understand a signalr chatting code Pin
Tridip Bhattacharjee11-Jan-15 23:49
professionalTridip Bhattacharjee11-Jan-15 23:49 
AnswerRe: Need to understand a signalr chatting code Pin
deepankarbhatnagar12-Jan-15 1:13
professionaldeepankarbhatnagar12-Jan-15 1:13 
GeneralRe: Need to understand a signalr chatting code Pin
Tridip Bhattacharjee12-Jan-15 20:40
professionalTridip Bhattacharjee12-Jan-15 20:40 
AnswerRe: Need to understand a signalr chatting code Pin
Dar Brett13-Jan-15 3:06
Dar Brett13-Jan-15 3:06 
QuestionGIF image as progressbar using AJAX modalpopupExtender Pin
sudevsu8-Jan-15 5:17
sudevsu8-Jan-15 5:17 
AnswerRe: GIF image as progressbar using AJAX modalpopupExtender Pin
jkirkerx8-Jan-15 7:30
professionaljkirkerx8-Jan-15 7:30 
GeneralRe: GIF image as progressbar using AJAX modalpopupExtender Pin
sudevsu8-Jan-15 10:21
sudevsu8-Jan-15 10:21 
GeneralRe: GIF image as progressbar using AJAX modalpopupExtender Pin
jkirkerx8-Jan-15 11:49
professionaljkirkerx8-Jan-15 11:49 
AnswerRe: GIF image as progressbar using AJAX modalpopupExtender Pin
Vimalsoft(Pty) Ltd12-Jan-15 20:51
professionalVimalsoft(Pty) Ltd12-Jan-15 20:51 
QuestionIf else condition fails, in VB.net Pin
sudevsu7-Jan-15 8:33
sudevsu7-Jan-15 8:33 
GeneralRe: If else condition fails, in VB.net Pin
PIEBALDconsult7-Jan-15 9:00
mvePIEBALDconsult7-Jan-15 9:00 
GeneralRe: If else condition fails, in VB.net Pin
sudevsu7-Jan-15 9:14
sudevsu7-Jan-15 9:14 

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.