WCF .SVC Debug=“true” ignored when when release compiling?

后端 未结 2 1223
灰色年华
灰色年华 2021-01-15 01:05

By default a .SVC file contains Debug=\"true\", I was wondering if this is ignored if you compile for release or is it still compiled with debug symbols?

Ex.

相关标签:
2条回答
  • 2021-01-15 01:33

    Debug=true attribute in @ServiceHost directive only apply, if you are writing your service as inline code in .svc file, or implementing service in "App_Code" folder. (It won't apply if already compiled into assembly and placed it into \bin directory.)

    0 讨论(0)
  • 2021-01-15 01:52

    Publishing a WCF service on IIS 8

    I had this problem and i found this as the solution. This worked for me perfectly (IIS 8)

    All the credits goes to György Balássy

    WCF services don’t run on IIS 8 with the default conჁguration, because the webserver doesn’t know, how to handle incoming requests targeting .svc Ⴡles. You can teach it in two steps:

    1. Add a new MIME type: Extension: .svc MIME type: application/octet-stream Add a new MIME type

    2. Add a new Managed HTTP Handler: Request path: *.svc Type: System.ServiceModel.Activation.HttpHandler Name: svc-Integrated Add a new Managed HTTP Handler

    That's it!

    0 讨论(0)
提交回复
热议问题