3

If I specify DefaultView like this, it works on my local IIS express, but not when deployed to IIS:

[DefaultView("Login.cshtml")]
public class SiteLoginService : EnshareServiceBase
{
}

My Views folder contains Login.cshtml.

It works as expected when running locally on IIS express, but will render the snapshot view when deployed on IIS.

After changing to full path, it works also in IIS:

[DefaultView("/Views/Login.cshtml")]
public class SiteLoginService : EnshareServiceBase
{

Is this by design or is there any other way how to configure ServiceStack to look into the Views folder also when deployed in IIS?

4

0 回答 0