Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an mvc app that is running under iis7
It needs to get data from a desktop application (Quickbooks) on the same box to process.
I have a little console app also running also on the same server at takes web requests for data from the mvc app and gets xml data from quickbooks for me.

Then I am trying to POST that data back to the mvc app.
I'm getting a timeout exception. If I point the console app at fiddler, there is the requested POST data, pretty as you please, but if the POST data is sent to localhost the
mvc app just sits there like I don't hear anything. I have tried to send the data to the "front door" at the mvc's fqdn but that doesn't work either. I thought iis would handle this for me.

So My question is: do I need to write an explicit listener in my controller or am I not thinking right?

The console app that takes the request for me to get QB data is at port 3000.

WebClient myWebClient = new WebClient();

     try
     {
         byte[] response = myWebClient.UploadData("http://localhost:3000", byteArray);

         string qbdtrtn = myWebClient.Encoding.GetString(response);
     }
     catch (Exception e)
     {
         // timeout
     }


What I have tried:

Seemingly everything under the sun. :-)
Posted
Updated 28-May-20 8:37am
v2
Comments
Richard Deeming 28-May-20 14:48pm    
I'm struggling to follow your description. Is the MVC app calling the console app, or is the console app calling the MVC app?

Your description suggests that the console app is calling the MVC app. But your code seems to be sending a request to the console app.

1 solution

Self- Solved

I'm a More-Ron (still)

All that was needed was to make the console app's url be http://localhost/<controller><function> instead of just http://localhost.

Now when the console app sends back the data it calls a function in a controller.
 
Share this answer
 
v2
Comments
Richard Deeming 28-May-20 15:01pm    
Could you add the details of how you solved it to your solution?

Or, if you don't think it would help anyone else, delete the question.

Thanks.
Ron Anders 28-May-20 15:14pm    
I can't delete it. Or i would.
Richard Deeming 28-May-20 15:24pm    
You're the second person to report that recently. Maybe you have to delete the solution first?
Bugs and Suggestions[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900