Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Updated 3-Dec-12 17:18pm
v5
Comments
Al Moje 3-Dec-12 23:58pm    
Try to access your application
http://ServerDomainName/serviceName?method=getFile
or
http://ServerIPAddress/serviceName?method=getFile
Nitin S 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 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 4-Dec-12 0:41am    
You must run the inetmgr and Modify Access Permission...
'eat a apple'

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://www.iis.net/learn/publish/using-the-ftp-service/configuring-ftp-firewall-settings-in-iis-7[^]

http://forums.asp.net/t/1417348.aspx/1[^]

Hope the above links help you.
 
Share this answer
 
v2
Comments
Nitin S 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 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
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.
 
Share this answer
 
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();
    }
}
 
Share this answer
 

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