Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
Hi,
On windows server 2008 machine
I have a java based web service running on port 1049.
I am able to access the service using URL http://localhost:1049/ on the development machine
but when I deployed the service on the public server to access the service from public url like http://mydomain.com:1049/serviceName?method=getFile
I get 404 not found error.
 
I have iis installed on the server,
and able to access my default asp.net site http://mydomain.com/[^]
however call to http://mydomain.com:1049[^] fails.
 
I wonder whether it is possible to redirect the requests coming to a virtual directory to the 1049 port.
Posted 3-Dec-12 1:21am
Edited 3-Dec-12 17:18pm
v5
Comments
Al Moje at 3-Dec-12 23:58pm
   
Try to access your application
http://ServerDomainName/serviceName?method=getFile
or
http://ServerIPAddress/serviceName?method=getFile
Nitin Sawant at 4-Dec-12 0:04am
   
Hi Al Moje,
Thanks for reply.
On the server following service is running on port 1049.
http://open.afterthedeadline.com/how-to/get-started/
 
IIs runs on port 80 and by default when we call a public URL it redirects requests to asp.net engine through port 80.
The grammar checker service is on port 1049.
and access URL is http://localhost:1049/checkDocument?data=i eat a apple
 
I am not able to access the service after deploying on server.
Al Moje at 4-Dec-12 0:24am
   
Actualy it is not possible to redirect the requests coming from a virtual directory to the 1049 port because.
 
Example:
I run my application on local host at
http://localhost:64458/edms/Default.aspx and is running.
when I published it in public server, I use to access it thru:
http://almojegm/edms/default.aspx
 
Maybe you did not published it correctly. There where some network security access
that your should consider.
example: Permission access on virtual directory like: IUSR, Netwok Service, Grant Full access to the two previous mention.
Al Moje at 4-Dec-12 0:41am
   
You must run the inetmgr and Modify Access Permission...
'eat a apple'
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi Nitin,
 
You are getting 404 error because none of the application is deployed in IIS server on port 1049. Hence you should deploy your application on the port 1049. You can change the binding setting in IIS 7 server, Refer the below link for more information.
 
^]
 
http://forums.asp.net/t/1417348.aspx/1[^]
 
Hope the above links help you.
  Permalink  
v2
Comments
Nitin Sawant at 4-Dec-12 1:45am
   
Hi Mohd,
Thanks for your reply. Your solution will work
but I do not have admin access to the firewall thats why cannot open/make public port 1049.
Mohd. Mukhtar at 4-Dec-12 1:50am
   
First deploy your application on port 1049. And on the server check with the below URL and see the result.
 
http://localhost:1049
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Make sure the correct ports are open on any firewalls/routers that are between the machine you are trying to connect from and the server itself.
 
If you can't telnet mydomain.com 1049 the port is being blocked somewhere.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

I figured it out myself.
 
Created a proxy page which takes the parameters and redirects the content to the localhost:1049 port and then sends the response.
 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack) {
            Response.Clear();
            Response.ContentType = "text/xml; charset=UTF-8";
 
            var client = new WebClient();
            string data = client.DownloadString("http://localhost:1049/checkDocument?data=i%20eat%20a%20apple");
            Response.Write(data);
 
            Response.Flush();
            Response.End();
        }
    }
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 550
1 mhegazy94 460
2 Ravi Bhavnani 230
3 Kornfeld Eliyahu Peter 185
4 Shemeemsha RA 160
0 Sergey Alexandrovich Kryukov 7,295
1 OriginalGriff 6,841
2 CPallini 5,420
3 George Jonsson 3,654
4 Gihan Liyanage 2,797


Advertise | Privacy | Mobile
Web01 | 2.8.140922.1 | Last Updated 4 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100