IIS 7 and Above
$metadata 404 (Not Found) when hosting SAPUI5 app that connects to WC...
Last post Apr 07, 2017 11:27 PM by jaldinger
Oct 21, 2016 04:50 PM|Hitman47|LINK
I have been developing SAPUI5 app that connects to WCF data service written in C# and there was no problem in the development process till i started to host the SAPUI5 app on my local IIS i started to get the following error in chrome developer tools
$metadata 404 (Not Found) whenever i tried to connect to the service
While in eclipse the code runs with no error
and hosted it on my local IIS and things were more than perfect then i developed a client app with SAPUI5 framework and again it was so smooth with zero errors until i hosted my client app on the local IIS i started to get the following error $metadata 404
404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /proxy/http/mikmo.mylocalhost.com/MIKMOWCFDataService.svc/$metadata
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1073.0
While developing i didnt get that error and i was developing the client app with Eclipse that uses Apache tomcat to run the SAPUI5 app
Any help would be appreciated
Thanks in advance
Oct 23, 2016 10:51 PM|Rovastar|LINK
Oct 24, 2016 02:21 AM|Yuk Ding|LINK
The environment under developing and IIS is different.
You may need to check the substatus code in IIS log.
If the error is 404.3 then you could try the method in following link to enable WCF service in IIS 7:
Please check The feature in Control panel->Programs->Turn Windows features on or off. Make sure the feature under .net 3.5 and .net4.5/WCF service/HTTP activation has been has been installed. Besides, please check whether Internet information services/Common
HTTP features/Static content has been installed.
If necessary, you could try to enable failed request tracing to get more detail about the error:
Apr 07, 2017 11:04 PM|jaldinger|LINK
I have exactly the same problem. I have developed an OData service in IIS and try to use it with UI5. While testing the UI, I get a 404 error when UI5 tries to load the .../$metadata document. Yet if I copy and paste the metadata URL into the browser, it
Seems to me that IIS is blocking the $metadata request if a "Referer" is present in the HTTP header, even though everything is running on the same server and site.
The specific error subcode I am getting is 404.0 by the way.
Have you found a solution to your problem?
Apr 07, 2017 11:27 PM|jaldinger|LINK
Never mind, I figured out my mistake: I was using a UI5 OData model that only works up to version 3. Since my OData version on IIS was version 4, it would come back with a 404. After changing my UI5 model to V4, it started working...