Click here to Skip to main content
15,905,028 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionPartial Authentication in ASP.NET MVC5 Pin
jasonalien18-Jan-15 22:06
jasonalien18-Jan-15 22:06 
AnswerRe: Partial Authentication in ASP.NET MVC5 Pin
Afzaal Ahmad Zeeshan19-Jan-15 5:26
professionalAfzaal Ahmad Zeeshan19-Jan-15 5:26 
Questionhow can i find iis manager in windows 8?? Pin
AbdelrhmanRaafat15-Jan-15 6:27
AbdelrhmanRaafat15-Jan-15 6:27 
AnswerRe: how can i find iis manager in windows 8?? Pin
Richard Deeming15-Jan-15 6:41
mveRichard Deeming15-Jan-15 6:41 
AnswerRe: how can i find iis manager in windows 8?? Pin
jkirkerx15-Jan-15 8:34
professionaljkirkerx15-Jan-15 8:34 
SuggestionEmail Notification of web content through .net Pin
M_Jaiswal15-Jan-15 1:45
M_Jaiswal15-Jan-15 1:45 
GeneralRe: Email Notification of web content through .net Pin
jkirkerx15-Jan-15 8:39
professionaljkirkerx15-Jan-15 8:39 
AnswerRe: Email Notification of web content through .net Pin
Atish K. Singh26-Jan-15 21:48
professionalAtish K. Singh26-Jan-15 21:48 
Questionresponse.Cookies Pin
AbdelrhmanRaafat14-Jan-15 22:18
AbdelrhmanRaafat14-Jan-15 22:18 
AnswerRe: response.Cookies Pin
Richard MacCutchan14-Jan-15 22:49
mveRichard MacCutchan14-Jan-15 22:49 
GeneralRe: response.Cookies Pin
AbdelrhmanRaafat15-Jan-15 4:28
AbdelrhmanRaafat15-Jan-15 4:28 
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 

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.