Sunday 15 February 2015

c# - Default mvc/webapi site works in IIS Express but not in IIS 7.5 -



c# - Default mvc/webapi site works in IIS Express but not in IIS 7.5 -

i've googled , searched stackoverflow, next not helpful

restful service works in iis express / vs2013 not on iis server - hot prepare when run says "the update not applicable computer."

different result in iis express , iis - not running dotnetnuke or webmatrix

running win7pro, iis7.5 have vs2013pro udpate 3 installed, had vs14ctp installed uninstalled.

create new project, chose web application, mvc+webapi, have webapi 2.2 installed via nuget. create no changes app, nail f5, app starts in chrome, see default asp.net site link home , api. clicking api link takes help page describing api calls available.

publish site file system, create new iis website, point site published folder, add together defaultapppool user folder. browse site within iis manager. site displayes no styles displayed. setup site machinename:80 tried machinename:50102. not using ssl or authentication.

in chrome console there 3 errors (this not happen in iisexpress) uncaught syntaxerror: unexpected token < modernizr:1 uncaught syntaxerror: unexpected token < jquery:1 uncaught syntaxerror: unexpected token < bootstrap:1

trying navigate api link, refreshes page, help page not displayed.

using fiddler seek nail 1 of services in iis express works expected. using fiddler seek nail of servcies returns default home page.

please recall no changes made code, default mvc+webapi solution created.

checked application_start(), contains globalconfiguration.configure(webapiconfig.register); sec line.

any help appreciated.

it comes downwards how created solution. in visual studio 2013 professional, file->new project -> visual c# -> web -> asp.net web application click ok. in pop under "add folders , core refrences for:" mvc checked , greyed out, cannot un-select it. check "web api" check box, click ok. work fine while working in vs. 1 time published release. point iis @ published folder, if needed, navigate page. page loads has errors described above.

to avoid this, not check "web api" check box when creating new project. add together web api solution after creating it, not during creation.

vs version 12.0.31101.0 update 4 .net version 4.5.52747

c# asp.net-mvc iis asp.net-web-api iis-express

No comments:

Post a Comment