Getting .asmx file in browser is fine, getting .asmx?WSDL returns an empty page - iis-7

I created a webservice in a .dll and put this in the windows\assembly directory.
I followed all steps shown in the following URL and stopped at the paragraph "Creating a Windows Application to Consume the Web Service", because my consumer is a Lotus Domino agent:
http://msdn.microsoft.com/en-us/library/ms464040.aspx
There are two installations, where it worked just fine, now I did this on a third computer and when I browse the URL to the asmx file in a browser (IE9, Firefox 12 & Chrome 19) I get the normal answer from the IIS 7. But when I click on the link for the service description
(.../DominoImporter.asmx?WSDL) all I get is an empty page! IE9 shows the default 404 page and in Chrome I have a white page with no source. Firefox shows an error message, that describes the empty page with a header of type XML.
This doesn't work:
hostname/_vti_bin/DominoImporter.asmx?WSDL
This works:
hostname/_vti_bin/DominoImporterwsdl.aspx
I searched half this day for differences between the three installations / computers but found nothing!
All forum help found by Google also discussed other problems than mine.
I think there has to be someone, who already has experienced the same problem & can give me advice!?

Ok, now I found a solution, I deinstalled Visual Studio 2010 and after this I deinstalled Sharepoint Foundation 2010. Then I reinstalled Sharepoint Foundation 2010 and installed Visual Studio 2012.
Then when I load the WSDL again, the resulting web page in the browser isn't empty anymore!
Wrote this, maybe someone else might need this solution in the future.
Turned out, that my Sharepoint installation was corrupt. Couldn't clarify this before out of time pressure with a higher prioritized project.

comment following line in web.config of webservices project.
<add name="ContentTypeHttpModule" type="Porthos.Signup.Extras.ContentTypeHttpModule, ContentTypeHttpModule"/>
Right click your service and view in browser.
Click on Service description and it will show you wsdl.
Additionally it will also resolve updating web reference error.

Related

Visual Studio shows blank page when web application is run

I've had an occasional issue with my laptop where the power instantly cuts out - without the machine shutting down properly. This happened a couple of times yesterday while I was working on a project in VS 2013. Since then when I try to run the project the browser loads and the name of the start up page appears in the url box but it just shows a blank page.
Before, the page loading icon in the Chrome tab would swirl for a while as it was loading, but now it hardly does that at all, as if it's not even trying to load the page.
Some extra info:
I tried setting a different starting page - same result.
I put a break point in the page load code - it doesn't get hit.
If I view the source of the blank it is completely empty, not even
tags
Other projects seem to work find still.
I'm using VS 2013 on Windows 7.
Tried deleting the temp asp.net files
(c/windows/microsoft.net/framework64/v4.0.30319/Temporary ASP.NET
Files) but curiously this folder is already empty - I'm sure this is
what I've done with problem projects before - although I've never
seen this particular problem.
I'm running on IISExpress and have tried all browsers and running without debugging with the same result.
Has anyone seen this problem before? Any ideas??
Thanks
I had the same problem. Solved it by adding a break point at Application_Error function in Global.asax.cs. Then I was able to see the real problem. It was because of some conflicting dlls.
I had the same problem as well. Suddenly when I launch my MVC web application from Visual Studio 2013, the browser comes up and the app is running, but the browser displays blank, no url and does not even try to load the page. In Visual Studio, none of the Script Documents are loaded either.
Simply by setting a breakpoint in Global.asax.cs, Application_start, everything went back to normal, problem solved.

WebResource.axd not loaded when using latest Google Chrome Browser

I'm having a strange issue:
I can't login at http://maskatel.info/login, when I try to click the login button (the blue button that says Connexion), nothing happens at all.
So I opened up the developer tools in Chrome (f12) and saw the following JavaScript error every time I click the button: Uncaught ReferenceError: WebForm_PostBackOptions
I then found out that this function should be in WebResource.axd, I then went to the Resources tab in the developers tool and found out that this 'file' is not there and it is not loaded in the HTML source.
I tried a lot of different things without any success and finally tried another browser and it works fine in any other browsers. That same page was working perfectly previously in Chrome on the same computer in the past.
So then I tried to click the small gear in the Chrome developer tools and went to the overrides section and changed the UserAgent to something else and refreshed the page and it works perfectly with any other UserAgent string. The correct UserAgent when not overridden for my browser is Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
So right now I really don't know what to do next:
Is this issue related to the latest version of Chrome? I have not found any information on release dates for chrome.
It could also be a DotNetNuke problem but I doubt it since nothing there changed before and after the problem
It could also be asp.net related (I renamed App_Browsers to App_Browsers2 and still no luck.
Any help would be appreciated.
A data file which addresses this issue is available to download from the following url.
http://51degrees.mobi/portals/0/downloads/51Degrees.mobi-Premium-20130823.dat
.NET users will need to perform the following steps.
Download the above data file.
Replace the file 51Degrees.mobi-Premium.dat in the App_Data folder of the web site with the data file downloaded, renaming the downloaded data file to 51Degrees.mobi-Premium.dat
Restart the application pool servicing the web site to apply the new data file.
Some configurations may place the 51Degrees.mobi-Premium.dat file in a location other than App_Data. The web sites current location can be found in the 51Degrees.mobi.config file found in either the web site’s root folder or the App_Data folder. See the following page for more details.
https://51degrees.mobi/Support/Documentation/NET/WebApplications/Config/Detection.aspx
Please use contact us if you have any issues deploying this data file.
We are having this problem on all our DNN6 sites at work (we can't update to DNN7 since we are stuck on SQL Server 2005 and Windows 2003 boxes). DNN support ticket response was:
"This is a known issue with the Google Chrome update to version 29, the browser is having many issues with ASP.Net pages. The current workaround is to use a different web browser until Google can release a new update."
but I know big asp.net sites like redbox and msdn.microsoft.com are working fine, so it's definitely not a global problem.
Our servers are patched by our infrastructure folks, and they are usually up to date (patched regularly), so not sure what specifically is the issue.
I have personal sites on DNN6 (3essentials hosting), that are working fine. So its definitely not all DNN6/7 sites that are having problems. Maybe its DNN6 sites that are running on Windows 2003 boxes?????
It looks like someone has found the culprit at google. It is related to 51degrees that reports a version 0 for Chrome 29 user-agent string.
More details at https://code.google.com/p/chromium/issues/detail?id=277303
I tried to update the premium data (it is a professional edition installation) but I only get the same version that was aready there dating from 2013-08-15 and having 109 properties.
Then I tried renaming the App_Data/51Degrees.mobi-Premium.dat to add a .old at then end, but the system redownloads that file (same one looks like) to that directory.
So I went away and commented out the fiftyone configuration in the web.config file which instantly made the site work again for Chrome 29.
Let's hope there could be an update on a beter solution for this, but I think the culprit is finally found at least.
On a DNN 7.1.0 site, that uses the Popup feature in DNN (login window opens in a modal popup) the login functionality appears to work fine.
I would recommend you try the Popup option, and if that doesn't work, look at upgrading to the latest release of DNN.
update: I tested the same 7.1.0 site using /login instead of the login popup and it also still works fine, so I would encourage you to look at upgrading your DNN instance.

No mapping data was returned from the server after installing ASP.NET and Web Tools 2012.2 Update

Went to http://weblogs.asp.net/scottgu/archive/2013/02/18/announcing-release-of-asp-net-and-web-tools-2012-2-update.aspx, downloaded and successfully installed the update but now when I try to view my site in page inspector it tells me "No mapping data was returned from the server". Created a new MVC4 app, and in that project page inspector works fine.
I made sure Web Essentials 2012 extension was updated to the latest version prio to installing the 2012.2 update like the blog says. Also this page wasn't much of any help: http://msdn.microsoft.com/en-us/library/jj204395.aspx:
Error
No mapping data was returned from the server
Description
Page Inspector can’t map between the browser and source code.
Cause
Not determined.
Fix
No specific recommendations.
Any idea what could be wrong and what else I should try?
Edit:
This is superweird. I did absolutely nothing and now all of the sudden it works again!
Unless closing and opening Visual Studio and the project a couple of times counts.
This is how it looks now - notice the difference in the first and last bullet:
Edit2: Used IISExpress in both projects. "No mapping data was returned from the server". Sounds like it could be an issue with IISExpress not liking the new stuff that where installed?
Edit3: This piece of code breaks page inspector:
<map id="surfer" name="surfer">
<area shape="poly" coords="0,23,30,13,40,3,64,5,69,19,86,23,98,30,99,51,72,63,68,83,41,83,38,67,1,65" alt="&%##?!">
</map>
Never thought that it could actually break an entire tool so didn't bother to test. Here's where I got the tip: http://social.msdn.microsoft.com/Forums/sv/visualstudiogeneral/thread/470ece78-86c3-4fab-b38c-cb969d515d43
Seems like a bug in page inspector/razor engine or in both.
Caused by a bug in page inspector/razor engine. Will get fixed soon. See Anands comment in question.

Visual Studio | ASP.NET Configuration error

I have a problem as I have struggled with for a week.
Now I give up! I really can not figure out how to solve it. Every time I open the ASP.NET Configuration in VS10, then comes the first with this error:
**An error was encountered. Please return to the previous page and try again. **
If I then press:
How do I Use this Tool
so this comes up:
**Tool Has Timed Out
As a security measure, the Web Site Administration Tool times out after a period of inactivity. Changes to machine.config or web.config may also result in the tool needing to be restarted. To continue configuring your web site, restart the tool. **
Some who can answer me on what's happening here?
"Special characters in the path may be the problem, according to the posts." as Posted above by Dave Swersky
THIS worked perfectly for me! I had a special character ("#") in my folder path I removed this and removed spaces for good measure!
I was getting the error "Tool has timed out" among other errors when accessing the WSAT(Web site administration tool) from the ASP.NET configuration menu item.
I saw a post somewhere else that said the problems was solved when the default browser was changed to Internet Explorer. I have been using Firefox and have the exact same problem. When I changed the default browser to IE, the configuration page came up with no problem. But it won't work twice in a row without going in and setting the default browser back to IE each time. When I go back in to Program Access and Defaults, "Use by current browser" is selected. I have to reselect IE, and then it will work one time.
Judging by the Connect site, this error has been reported and is not well understood:
http://connect.microsoft.com/VisualStudio/feedback/details/118567/an-error-was-encountered-please-return-to-the-previous-page-and-try-again
Special characters in the path may be the problem, according to the posts.
This is what worked for me.
I'm using Visual Studio 2010 trying to create the membership role. I was trying to use the ASP.NET Configuration in Visual Studio.
Set the 'Default Browser' to Internet Explore.
To do this:
Right click on one of the .aspx pages you have under "Solution Explorer".
Select "Browse With..."
Select Internet Explore and Click on Set as Default.
Close the box.
Go back and click on "ASP.NET Configuration"
This will automatically open Internet Explorer.
Problem Solved :D
I guess what I was doing wrong was using Firefox as the default browser with Visual Studio. I'm guessing Visual Studio works good together with Internet Explorer since Momma and Daddy made them together (awww how cute)
The issue might be related to an application path that has spaces. After googling I managed to bypass the issue by appending the application path to the url manually ie.
http://localhost:{your_port_here}/asp.netwebadminfiles/default.aspx?**applicationPhysicalPath={path_to_your_application}&applicationUrl=/**
As a firefox user, I closed firefox then executed the "ASP.NET Configuration" option in VS2010. It automatically opens firefox (default browser) and now I am seeing WAT page contents.

Why would an aspx file return 404 ("The page cannot be found")

Why when I access an aspx (e.g., http://www.example.com/foo.aspx - not the real site) through IE6 would I get a 404 Error (i.e., "The page cannot be found") in IIS6
I've got scripts enabled for the website and I've tried with executables enabled as well.
Here is the full error:
The page cannot be found
The page you are looking for might have been removed, had its name changed, or
is temporarily unavailable.
------------------------------------------------------------------------------
Please try the following:
Make sure that the Web site address displayed in the address bar of your
browser is spelled and formatted correctly.
If you reached this page by clicking a link, contact the Web site
administrator to alert them that the link is incorrectly formatted.
Click the Back button to try another link.
HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)
------------------------------------------------------------------------------
Technical Information (for support personnel)
Go to Microsoft Product Support Services and perform a title search for the
words HTTP and 404.
Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for
topics titled Web Site Setup, Common Administrative Tasks, and About Custom
Error Messages.
I can get to Default.htm in the same directory, so I know the path is right. I've opened it up to everyone (temporarily) so I know the permissions are right.
It could be a lot of things. I had this issue today because .NET had not been re-initialized after installing IIS (aspnet_regiis -i -enable or equivalent).
Check that the anonymous user under which the site runs has read access to the file foo.aspx.
IIS6 and later uses a 404 response, thereby not letting an attacker know whether such a file even exists.
I just happened to find another culprit for this issue. My foo.aspx page referenced a particular master page that had a <%# Register %> directive to a user control that did not exist. Removing the reference to the non-existent user control caused my foo.aspx to load instead of 404.
I found a solution here.
The real catch was using this:
Response.TrySkipIisCustomErrors = true;
The site is pointing to a different directory where the page is not.
It could be permissions, however I would think you would get an access error instead.
I'm assuming you are running IIS.
Check that www.example.com is going to the site that you think it is.
If you are hosting multiple sites on the same IP using host headers you may want to double check the name you are using is going to the site you think it is.
Ray and Joe probably have it. In order to serve any file type, IIS has to have a mapping for it. Aspx files require that they be mapped to the AspNet ISAPI dll, which the .Net installation normally takes care of. If you install IIS after .Net (and I'm sure there are other situations), you have to initiate this yourself by running aspnet_regiis.
ALTERNATE SOLUTION (same error perhaps different cause).
I had installed Visual Studio 2008 Pro without SQL Express it, and it caused this same error. Reinstallation of VS2008 with sql express included seemed to have corrected the problem, or perhaps the install took other actions. I did try to register ASP.net numerous times prior but no luck however it is definitely the most probable cause Just posting my experience for those pulling their hair as I was..
Thanks
If you register the .NET 4 version of IIS, you may find it's grabbed the registration of the aspx extension. If ASP.NET v4 is prohibited then 404 will be returned
I had this issue where some customers were reporting the 404.0 and some didn't have the problem at all(same page). I was able to navigate to any of the pages with no problems from my machine. Some customers would refresh and it would go away. I am using .Net 4.5.2 and IIS 7.5.
Looking at the IIS log file I would see:
sc-status sc-substatus sc-win32-status
404 0 2
sc-status.sc-substatus: 404.0 - Not Found
sc-win32-status: 2 - ERROR_FILE_NOT_FOUND
https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx
https://en.wikipedia.org/wiki/HTTP_404
I found the problem was I had deployed a new version of the website in which the old version of the website had RouteConfig.cs/FriendlyUrlSetting setup by creating a project using the web forms template. The new version was created using an empty template. So obvious to me now.. no URL routing. Customers had a cache issue with certain pages on their machine(no .aspx extension) and having them clear browser data ultimately fixed the problem.
I got this issue when I tried using a different drive to host my apps. I ended up moving them to the wwwroot folder because it was working there and I did not have to time figure out why it is not working on the E:\ drive.
I had bin\roslyn compiler missing. Adding that all worked fine.
Check for double quote errors. I started getting a 404 on a single page because I accidentally had this:
<asp:TemplateField HeaderText="ImageURL"">
instead of this:
<asp:TemplateField HeaderText="ImageURL">
For an aspx page, error 404 can be quite misleading! I have seen all the answers and they presuppose assuming various issues with the file, page, path, etc. but the simplest issues is the fact that if there is an error in your asp page (i.e bad format, improper usage of control, etc. asp will think the page does not exist and will post a 404 when in all actuality, it is easy to ascertain if there is a bad format by simply clicking on design mode. If the page does not render no need to do anything else but look at what is causing the render error, fix and viola'! Your page shows since it was never missing or can't be found, but it simple did not know how to display! Too often people go looking for the wrong solutions and waste so much time! Hope this helps somone. :-)

Resources