Click here to Skip to main content
13,046,470 members (68,124 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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
I get 404 not found error.

I have iis installed on the server,
and able to access my default site[^]
however call to[^] 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
Updated 3-Dec-12 17:18pm
Al Moje 3-Dec-12 23:58pm
Try to access your application
Nitin Sawant 4-Dec-12 0:04am
Hi Al Moje,
Thanks for reply.
On the server following service is running on port 1049.

IIs runs on port 80 and by default when we call a public URL it redirects requests to 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.

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:

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'
Rate this: bad
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.[^][^]

Hope the above links help you.
Nitin Sawant 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.

Rate this: bad
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 1049 the port is being blocked somewhere.
Rate this: bad
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.ContentType = "text/xml; charset=UTF-8";
            var client = new WebClient();
            string data = client.DownloadString("http://localhost:1049/checkDocument?data=i%20eat%20a%20apple");

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 4 Dec 2012
Copyright © CodeProject, 1999-2017
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