Accessing web service from another system using ipaddress - web-services

I have a website working. I run it and i see localhost/pagename.aspx up and running. I replace it with my ip address and the port number like this .. ://10.xxx.xxx.xx:12234/pagename.aspx and it does not work. If I use 127.0.0.1,it works.The thing is this web site has an asmx web service. I need access to it. I disabled my firewall.I also added inbound and outbound rule for the port 12234. I allowed on both times. But still cannot see. What am I doing wrong?Is there any other way I can get access? (Some research told me to go to IIS and do some setting changes there. It was not that clear). More questions coming. Thanks.

I want you to follow this tutorial.
I will give you a few steps too.
Go to the iis manager and create a new application pool with the .net framework set to v4.0. Also note that the framework of the application/service that you are going to use is also the same framework.
Publish your web application/ service into a folder in you file system with publishing profile as "File System".
Copy the folder (that you just published) into C:\inetpub\wwwroot (which is the default folder).
Open iis manager and refresh the default site and the new folder that you just copied into the C:\inetpub\wwwroot folder will appear.
Right click that folder and click convert to application.
Right Click again and click -> manage application -> Advanced setting. Find and change the application pool from Default to the new pool that you just created.
Enable directory browsing which is on the middle pane.
On the left pane, click "rowse *:80 (http)"
the browser will open and you can see the application/service running.
http://localhost/something/ will be your default value on the address bar.
changing it to 192.168.1.85/something will also give you the same result. The same can be accessed from any computer in the same network with the ip address your system
192.168.1.85 was my system's ip address. run command prompt and type in ipconfig and you can find your ip address.

Related

404 On existing .svc file

I have an IIS site on a Windows 2012 R2 server. The site has an Application inside it:
The URL for this site is setup on our Active Directive servers as it is only accessible internally from our company. The URL follows the following structure:
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local
The service for this site is placed in an internal folder:
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/InternalFolder/Service.svc
I have placed a number of test files both at the root level and in the internal folder:
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/HelloWorld.html
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/InternalFolder/HelloWorld.html
I can browse these files without any problems. However, I cannot browse the service at http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/InternalFolder/Service.svc
The browser returns
However the file is there, and I have made sure there are no typos in the URL I put in the browser.
I have looked at similar questions but there seems not to be anything like the problem I am experiencing. The only question that looked promising was:
WCF service file not visible
But the answer for that post does not apply to my issue as I already have the configuration mentioned in that post setup as it is suggested.
I have checked the IIS-level config files for any exclusion regarding .svc files or anything similar, but could not find anyhting.
Have you got any suggestions on where to look at to solve this issue?
Solution: Install HTTP Activation feature
After running some more testing on other sites on the same server, I actually realised that the issue was specific to .svc files. I therefore made another search on Google and found that the server was missing the "HTTP Activation" feature (part of the WCF Services).
So, if you are having the same issue on .svc files follow the following steps to make sure you have the right components installed on the server:
Open Server Manager
In Server Manager, click the Manage menu, and then click Add Roles
and Features
In the Add Roles and Features wizard, click Next. Select the
installation type and click Next. Select the destination server and
click Next.
Skip the Server Roles page.
On the Select features page, expand ".Net Framework 4.5 Features",
expand "WCF Services" and select "HTTP Activation". Click Next.
On the Confirm installation selections page, click Install.
On the Results page, click Close.
The same can be achieved by running the following Powershell command:
Install-WindowsFeature -Name NET-WCF-HTTP-Activation45
This did the trick for me. I hope it can be of help to someone.

RDS falls over after server creation in CFBuilder

I am using CFBuilder 2.0.0 and I can connect to RDS fine so my CF instance is definitely set up correctly. However, as soon as I create a server using the following technique:-
Right click on project name > ColdFusionServer Settings
In servers drop down select 'Add Server...'
In new dialogue choose 'Import configurations from RDS server' selecting me RDS configuration
I leave all the settings the same on the first page apart from selecting Is Local and changing the Host Name as my CFadmin and my website are on different hosts
In local server settings I choose the JRun4 install folder for Server Home and the the root of the project in Eclipse as the Document Root
I do not install the extensions
Click finish
Now when I try and expand the RDS connection I get an alert box saying:-
Could not initialize class com.adobe.rds.core.services.messages
I am totally stuck here and would appreciate any help.
It turns out that you cannot configure CFBuilder to work if your CF Admin and your application do not reside on the same host name. Quite why this is is anyone's guess.
To resolve this I needed to make the server I configured on my project use the same host as my CF Administrator. This is obviously very counter intuitive, and means that if CFbuilder launches the browser for you for debugging it will get the wrong domain name. However, if you start the debugging session and then manually browse to the page in the browser then the debugging does work.

Configure IIS 7.0 to enable webservices in classic mode

What are the configuration file settings to enable webservices on IIS 7.0 in classic mode?
The site has to be in a classic mode application pool because the Report Viewer controls crash when running in Integrated Mode. However in a classic mode application pool, webservices produce the following error message:
The requested content appears to be
script and will not be served by the
static file handler.
•If you want to serve this content as
a static file, add an explicit MIME
map
EDIT - Additional Error Message Info:
HTTP Error 404.17 - Not Found
Module: StaticFileModule
Notification: ExecuteRequestHandler
Handler: StaticFile
Error Code: 0x80070032
Note: This particular instance of the application will be running in a customers account on a shared hosting enviroment so access to IIS UI is not/will not be available. Specifically seeking configuration file adjustments.
In IIS Manager (Start -> Run -> inetmgr), select the website or virtual directory you want to set to classic mode.
In the right hand panel "Actions", click on "Basic Settings".
Next to application pool (that is defaulted to DefaultAppPool), click "Select" and change it to "Classic .Net AppPool".
Walkthrough is here.
Update: Sorry, I misread your question. There are a couple of things you can try:
The first is to double check the IIS installation features from the control panel (Programs and Features -> Turn Windows Features on and off -> Internet Information Services -> World Wide Web Services -> Application Development Features). I have everything bar CGI and Server-side includes checked).
Secondly, make sure that your site is correctly setup as an application (select website -> Actions -> View Applications). If it isn't there you'll need to add it.
Third thing to check is specifically the Handlers, which is accessed through IIS Manager -> Select website -> Handler Mappings -> Open Feature -> Make sure .asmx is there. I have it three times, WebServiceHandlerFactory-Integrated (handler System.Web.Handlers.WebAdminHandler), WebServiceHandlerFactory-ISAPI-2.0 (Isapi Module), and WebServiceHandlerFactory-ISAPI-2.0-64 (Isapi Module).
Finally you make sure you are using the correct .NET version for that application.
Again, apologies for the original duff answer.
Thanks Junto for the post! I tried so many things that other people were suggested but couldn't get my site to work. I followed your instructions and sure enough, my applications were listed under Sites in IIS, but were not shown in the Application Pools. I deleted the Applications and created them. Everything work as expected after that.
In case someone is interested of what I went through. I was migrating from IIS6 to IIS7. All the virtual directories and applications seem to be ported fine, but not all of them got into the Application Pools. So, if you're running into the same issue, "Error 400.17. If you want to serve this content as a static file, add an explicit MIME map", check your App Pool to make sure all your applications are shown.
This sounds like your HandlerMappings are a bit screwy. You can revert to known good a baseline (provided you haven't tinkered with the server wide Handler Mappings) by doing:
Open IIS Manager
Open the site in question
In the Features View for the site open the Handler Mappings feature
In the Actions pane (top right), click on "Revert To Parent"

How to config IIS in Windows XP SP2

new to IIS. I have two questions:
After installing IIS, I straightly wen to my browser and typed in http://127.0.0.1. But a user name and password dialog box pops up and I have no idea what to type in. Why IIS asks this information? How can I remove this asking.
I want to put a web service under IIS. The web service is written in C# under .net. Is there any tutorial for this config? I found a tutorial but it is under windows server 2003 and there is an option called web service extension. However, I installed IIS in XP and the UI seems completely different.
FYI, the IIS Management tool I used tells me that it is version 5.
Thank you very much for the help.
[FYI, the question #1 is the kind that is typically better addressed on serverfault.com, I'll answer it as well since it is bundled...]
To resolve 1), i.e. to allow anonymous access to the web site
- Open the IIS management console
Either from Computer management Console, in 'Aervices and Applications'
+ 'Internet Information Service'
or from the control panel + Administrative tools
+ 'Internet Information Service'
- On right pane, navigate to 'Web Sites' + 'Default Web Site'
- Right Click, select 'Properties' in menu.
This brings a squarish dialog with 2 rows of 4 tabs each at the top.
- Select 'Directory Security' tab
- then in the top group named 'Anonymous Access and authentication control',
click 'Edit'
- The dialog that comes up is where you need to check the Anonymous access,
and enter the account credentials for the account which IIS will use, on
behalf of the anonymous users. I recommend you create one account for
this purpose, rather than using yours or some other actual user.
Now, concering 2) i.e. to deploy the web service itself
I think you just need to copy the asmx file into the location where you want the web service to run, and the binary files (dlls) to the bin directory. In other words its just like publishing a regular .NET web app, except that the files (referenced in the URI) are named *.asmx. (you can also make this file the default file for the dirctory).
This of course implies that .NET would be installed on thie machine, adn allowed to work (see the '.NET Application" tab of the web properties dialog.
A final bit of advice: You probably will want to install this webservices in its own Web Site (or Web application) and own directory. Refer to serverfault.com for more detail about this type of tasks. There are very many settings, some of which have repercussion on security or performance --> let the pros tell you ;-)

Accessing scripts inside IIS virtual directory

I have an IIS 6 server with a virtual directory pointing to a network share on another machine. That web server also serves ColdFusion scripts. When I access regular HTML pages that reside in the virtual directory, they are served properly. Anytime I try to get to a ColdFusion script, however, ColdFusion throws a "File not Found" error.
Am I missing a step? Is there something else that I have to do in ColdFusion to tell it where the files in that virtual directory actually exist?
This sounds like you may need to alter the permissions that ColdFusion runs under and that right now it does not have sufficient permissions to access the network share.
To change the permissions or user CF runs under:
Open Services
Find the CF Service (depending on your version it might start with Macromedia...)
Right Click, Open Properties
Click on Log On
Then either change the account it logs on as or change the permissions for the current user.
Click OK, Apply, etc...
I'm pretty sure you will have to bounce the CF Service.