Error attempting to access a web service (hosted locally or externally), can't resolve host name - asp.net

I'm stumped. I've got an asp.net mvc app being hosted on a shared hosting provider. The configuration of their system leaves a little to be desired, but it's cheap (getting what I pay for I suppose...)
The problem is this: The application is hosted at the root level of the hosting account. I have a virtual directory established underneath the root that is running a .net 2.0 web app along with a web service. I can access the web service directly via the domain/subdirectory url. The main web app (at the root level) needs access to the web service in the virtual (subdirectory). Locally in development, I can run the app against the web service out on the hosting server and it runs just fine. When I push the web app up to the root of the hosting service, I get "The remote name could not be resolved: ".
At first I thought the error was related to the DNS settings of the primary domain since both the web app and web service technically live at the same domain. As part of just trying to get something working, I reverted the web app to reference an older version of the web service on a different server (different host altogether). Again, it works fine locally. When I push the updated web app, I got the same error, but noticed the host name referenced is that of the external domain. Of course, I can access the web service via the browser just fine.
Sorry if this doesn't make total sense... it's late and I'm beat from looking at this for the last few hours. Any help would be greatly appreciated.
EDIT
So the web app simply has a Web Reference to the web service (I could probably just restructure the app avoiding the web service altogether, but time is of the essence [for now]). Since I got stuck last night, I pointed the web reference back to an old server but the issue remains. Right now the url the web reference points to is http://road34.hi-fisoftware.com/webservices/giigsterservice.asmx.

If the server has a firewall then and an external ip and different internal ip then probably you will not be able to access the webservice with the domain name. you will need to access it as internal url or as relative url.

Related

What role does a web sever play in hosting of single page applications

As per my understanding, when user visits a url of a SPA application, the whole application is downloaded including any static html,assets and javascript. Can someone please clarify what role does the host web server play from there on? If after download of all the assets, I turn off the web server the application does not work. But ideally, it should work because now all the code to create any views is with the client already in form of javascript files. Let's assume there are no API calls for data.
Yeah it will work
If the application is fully loaded in browser it will work even after you turned off or disconnect the web server
Web Server No Need after the client has downloaded all the assets

How to GET RID of the iFRAME on Azure that wraps my website I uploaded via FTP

this is driving me NUTS!
I have a website I built that's on AZURE.
I built it in NETBEANS 8.2 like I do with EVERY SITE since 2011.
I uploaded to AZURE via FILEZILLA with no issue. When I got to login, BOOM! I get this error:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
It's because of AZURE WRAPPING MY SITE with TWO IFRAMES!!! Whiskey Tango Foxtrot???
When I'm on my 1and1 DEDICATED SERVER and NOT a VIRTUALIZED AZURE SERVER, I have ZERO PROBLEMS and no IFRAMES!
PLEASE SOMEONE TELL ME HOW TO GET RID OF THIS ANNOYANCE???
UPDATE: BRANDO, here's the config on Azure for Virtual Directories. It's pretty straight forward and I get an iFRAME!!! Azure "IS" doing this!!]1
Azure web app will not add any codes to your html page.It is just a host platform.
www.thingblugrow.com/www.thingblu.com <--- custom domain, add the frameset
testappinnovyt.azurewebsites.net/thingbluapp.azurewebsites.net <--- azure web site doesn't add the frameset
So this issue is not related with azure web app.
So I guess the frame set is added by your custom domain company server or you set the frame by code at some other place(by js) not the azure.
I suggest you could try to connect with your custom domain support and could follow this article to bind the custom domain with your azure web app.

ASP.NET WEB API 2 Works Locally But Not On Production Web Server

I've developed a new WEB API 2 that works great locally, however when I upload the same code to my production server (Arvixe in this case) all I get is a 404 when I call it. I've spent HOURS searching the web, reading forums, etc.. and have been able to find no resolution, so I'm asking here as my last effort.
I'm currently only testing with the default project that gets created when you do New Project > ASP.NET Web API 2 Empty Project in Visual Studio. This creates an empty project with a single ValuesController. You should be able the JSON response by called /api/values, but this doesn't even work.
I'm using Fiddler to test the API locally and on the web server.
http://localhost:1993/api/values <--- works great
but
http://api.mydomain.com/api/values <--- returns 404
Note: I created a subdomain "api" in this case, but everything for the code for the API is unchanged from when it was created.
Why in the world does this work locally but not on the production web server?
That the server returns 404 (Not Found) may indicate a lot of things. However you can check using the following step:
Add a simple text document like readme.txt to your a folder sub-domain http://api.mydomain.com, and try to get access to that. If you can't access to that file, it means that the subdomain is not configured properly.
Publish the webservice using the "Publish" functionality, so that all DLLs will be copied.
After that,try to reach the Web ApI again.
Hope that help.
"Note: I created a subdomain 'api' in this case, but everything for the code for the API is unchanged from when it was created."
Above comment of your's is suspicious, you should publish your WEB API application in the root directory. Like if http://example.com is pointing to "MyExample" folder, then application should be published on "MyExample" folder.
After that you will be able access your api with http://example.com/api/{controller}/{action}
Just a simple suggestion which I'm sure you have already considered, but have you opened the http port 80 on the server's firewall?
Also stick a plain old html file in the root of your project and see if the server serves it up.
in your case, since you create a subdomain of 'api', you should try
http://api.mydomain.com/api/api/values
note that if you're using database for the function, you should change the connectionString in your web config
Please verify the .net framework on you hosted domain that may be old one.
Web api 2 is supposed on 4.5 framework.
One reason for web api 2 method working OK on local machine but not on production server is that the method you are calling is working on local machine but not on remote server. In such a case you will receive message 404 or 500, and you would be lost why this routing is failing.
Why a method would fail on remote server, well there may be many reasons. For me, I was querying database in my method and my connectionString was not set for remote server.
One way of resolving it would be to put some very simple code in that particular method and test that routing is working. Then check your original code for errors reasons.

Configure IIS 6 web application on a personal server

A group of us wrote a .NET web application for our University class and in order to let our prof test with it I am setting it up on my webserver at home. Here is what I have done so far:
I created a new account on my domain, I then granted that account Read, write access to the folder where the app is stored. I have setup an application pool that uses this new account as its identity and created a new site that uses the new application pool.
I initially was receiving the Service unavailable error message, so I realized I had to add my account to the IIS_WPG account. So now I am stuck at the "page cannot be found". The website is pointing to the correct folder (I can see the aspx page list from within the IIS browser) but when browsing the site either in IIS, on a browser on the server or on a browser within my network I keep getting Page cannot be found. The home directory is pointing to default.aspx which is what our app uses.
The app of course works just fine when running from within the IDE, but now that I am trying to get it to work it doesn't want to.
Any thoughts?
Thanks.
you should give error details first.
for now, I suggest you check the 'network service' account's permission.this is the ASP.NET's account.
then publish your site to *.aspx file and *.dll file. to see if there is any errors.
So I found the issue. What I didn't know is that by default, IIS 6 does not turn on support of active server pages and .NET pages in Web Service Extensions. Once I had turned this on the site began to work just fine.

Test Flex/Facebook Application localy

I´m new in Flex.
I'm trying to develop a Web Application integrated with Facebook.
I´m using Flash Builder 4.5 and the Adobe Facebook SDK.
The problem is that to test the application I need to upload the files to my webserver to avoid the facebook error.
I guess this is because Facebook only allows to run the application inside the domain that informed at my app page on Facebook.
Someone knows how can I test the application locally?
Best, Flávio
One way to test your application is to create a copy of your app on Facebook (i.e. register a new application), but set it up to point to localhost (i.e. your local development server). This will let Facebook send all the login redirects back to your local webserver rather than your current 'live' website.
It would help if you install a localhost webserver on your machine so you can run code locally. This will allow you to test your files on your own machine rather than having to upload them every time.
Set up a local web server (I like Apache, but IIS will work). with a virtual server and give it the same domain name as your production server. Use a hosts file to point the domain back to your own server.
You can also use Charles to record the web traffic, then build mock services that will provide that information.

Resources