Click here to Skip to main content
15,891,708 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion' Pin
Not Active10-May-10 16:01
mentorNot Active10-May-10 16:01 
QuestionCreate download link for csv file on client-side in javascript. Pin
zeeShan anSari10-May-10 9:28
zeeShan anSari10-May-10 9:28 
AnswerRe: Create download link for csv file on client-side in javascript. Pin
Not Active10-May-10 10:09
mentorNot Active10-May-10 10:09 
GeneralRe: Create download link for csv file on client-side in javascript. Pin
zeeShan anSari10-May-10 10:15
zeeShan anSari10-May-10 10:15 
GeneralRe: Create download link for csv file on client-side in javascript. Pin
Not Active10-May-10 10:24
mentorNot Active10-May-10 10:24 
QuestionGet all selected ros from gridview. Pin
AsianRogueOne10-May-10 9:22
AsianRogueOne10-May-10 9:22 
AnswerRe: Get all selected ros from gridview. Pin
Peace ON10-May-10 20:26
Peace ON10-May-10 20:26 
QuestionWeb Service Deployment and Usage [EDIT #2] Pin
#realJSOP10-May-10 5:19
mve#realJSOP10-May-10 5:19 
I have (and use) an ASMX web service in my solution.

Obviously, the web service will live somewhere else once it's deployed. How do I make my app work both locally (using the web service in the solution), but at the same time work with the same web service in its deployed location?

EDIT ====================

It looks like I can create the connection programatically, but I'm not sure of the process. I'm still googling and checking back here periodically to see if anyone can provide asome example code.

EDIT ====================

Okay, I did this, and it doesn't choke on it, but I get no response when I try to hit the methods in the remotely deployed service:

private const string ProductionUrl  = "http://server1/folder1/MyService/MyService1.asmx";
private const string DevelopmentUrl = "http://server2/folder1/MyService/MyService1.asmx";
private const string LocalHostUrl   = "http://localhost:55179/MyService1.asmx";

switch (Application.Current.Host.Source.Host.ToLower())
{
    case "server1" : CurrentUrl = ProductionUrl;  break;
    case "server2" : CurrentUrl = DevelopmentUrl; break;
    default        : CurrentUrl = LocalHostUrl;   break;
}

// for testing
CurrentUrl = DevelopmentUrl;

service = new ProjNamespace.Service1Reference.Service1SoapClient("Service1Soap", CurrentUrl);
service.GetServiceVersionCompleted += new EventHandler<ProjNamespace.Service1Reference.GetServiceVersionCompletedEventArgs>
                                      (service_GetServiceVersionCompleted);
service.GetServiceVersionAsync();

.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
modified on Monday, May 10, 2010 3:12 PM

AnswerRe: Web Service Deployment and Usage Pin
Abhishek Sur10-May-10 7:28
professionalAbhishek Sur10-May-10 7:28 
GeneralRe: Web Service Deployment and Usage Pin
#realJSOP10-May-10 9:15
mve#realJSOP10-May-10 9:15 
GeneralRe: Web Service Deployment and Usage Pin
Abhishek Sur10-May-10 12:38
professionalAbhishek Sur10-May-10 12:38 
AnswerRe: Web Service Deployment and Usage [EDIT #2] Pin
Martin Jarvis10-May-10 12:41
Martin Jarvis10-May-10 12:41 
GeneralRe: Web Service Deployment and Usage [EDIT #2] Pin
#realJSOP11-May-10 3:33
mve#realJSOP11-May-10 3:33 
GeneralRe: Web Service Deployment and Usage [EDIT #2] Pin
Martin Jarvis11-May-10 4:58
Martin Jarvis11-May-10 4:58 
QuestionUsing Javascript and server side code to handle button click event Pin
Adam Brown 310-May-10 4:48
Adam Brown 310-May-10 4:48 
AnswerRe: Using Javascript and server side code to handle button click event Pin
Brij10-May-10 6:29
mentorBrij10-May-10 6:29 
AnswerRe: Using Javascript and server side code to handle button click event Pin
Ryan McBeth10-May-10 15:54
Ryan McBeth10-May-10 15:54 
QuestionMail Server Pin
Dhyanga10-May-10 4:45
Dhyanga10-May-10 4:45 
AnswerRe: Mail Server Pin
Michel Godfroid10-May-10 11:56
Michel Godfroid10-May-10 11:56 
QuestionSyntax error: Missing operand after '12' operator. Pin
sankararao10-May-10 2:47
sankararao10-May-10 2:47 
AnswerRe: Syntax error: Missing operand after '12' operator. Pin
Brij10-May-10 2:58
mentorBrij10-May-10 2:58 
GeneralRe: Syntax error: Missing operand after '12' operator. Pin
sankararao10-May-10 3:06
sankararao10-May-10 3:06 
GeneralRe: Syntax error: Missing operand after '12' operator. Pin
Brij10-May-10 3:16
mentorBrij10-May-10 3:16 
GeneralRe: Syntax error: Missing operand after '12' operator. Pin
sankararao10-May-10 3:26
sankararao10-May-10 3:26 
GeneralRe: Syntax error: Missing operand after '12' operator. Pin
Brij10-May-10 3:52
mentorBrij10-May-10 3:52 

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.