Until now I have developed .NET Core applications (with C#) using Visual Studio for Mac, but I want to migrate to Fire/Swift. I’m currently testing / evaluating everything.
When I do a Release / Publish build, the necessary web.config file isn’t created. What am I missing here?
what specific error/problem do you get? I would expect a Web.config to be optional and/or be provided by the main IIS site. How/where are you deploying this?
I get the error “403 - Forbidden: Access is denied”. It’s the kind of error that you get when IIS can’t find a default file to load.
It’s a shared webhosting supporting PHP, ASP.NET and .NET Core.
I guess the web.config is needed to let IIS decide between ASP.NET and .NET Core. Eg. a web.config is also needed to specify the PHP version when it’s a PHP site.
I’ve now created the web.config myself (modified copy of other site). The only thing it basically does is referring to the Core DLL.
It would be nice if the build would do that for me.
Gotcha. So simply adding the Web.config file did the trick? Can you send me the file you sued, for reference? Also, for the VC# project, where does the file come from — is it in the original project, or is iot generated entirely automatically from nothing, by the build?
Yes. I copied the contents of the Release folder, created by Fire. I only created the web.config file, which is a modified copy of the Publish made by VS Mac. I’ve checked the project folder, in VS Mac, and didn’t saw a web.config file there. Also not in bin/Release. It’s only created when doing a Publish (bin/Release/Publish folder).
The only thing I changed is the value of the attribute “arguments” in the “aspNetCore” element. That’s all. Of course I don’t know for sure if in some scenario’s other values have to be added, but I honestly think this is all what IIS needs to know.