Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the better way to implement a request/response in .NET when dealing with just getting an xml web resource for the external source and process it to your system? By the way, to access this xml resource it needs an authentication or not, but if the resource has an authentication it use the "Basic authentication".

I tried webrequest/webresponse then use try/catch to know if it needs to be authenticated and use some javascript to popup a window for login. I'm not sure if this is the way I should implement this kind of functionality.

Requirements should be: the system should able to download an xml from external source, if the external source url has an authentication the system should allow the user to authenticate it by providing a login window. Once done and downloaded the xml content the system will process the data and save it to the database.

share|improve this question
1  
What do you mean by "best?" Note: don't answer that question by just using another word that also means "best." State your specific requirements. – Robert Harvey Feb 7 at 15:57
    
@RobertHarvey already edited my question – rpm07 Feb 7 at 16:05
    
Just use the webrequest/response patterns in .net, they also include that ability to do authentication. When you do this, you are "low" in the system stack, just one layer above the socket, so it is the best way to do it. – John Peters Feb 14 at 5:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.