简体   繁体   English

如果asp.net托管提供程序不允许Roslyn Compiler所需的.exe文件,可能的解决方案是什么?

[英]What is the possible solution if the asp.net hosting provider does not allow .exe files which I require for Roslyn Compiler?

I have developed a responsive asp.net website using Visual Studio 2015 Community by choosing the default ASP.NET Forms template . 我通过选择默认的ASP.NET Forms模板,使用Visual Studio 2015社区开发了一个响应式asp.net网站。 On my local computer, the website runs perfectly fine, but when I uploaded all the files of the website to the internet server, I found that I am not able to upload three files with .exe extension namely "csc.exe","vbc.exe" and "VBCSCompiler.exe" under the path "/Bin/roslyn". 在我的本地计算机上,网站运行正常,但是当我将网站的所有文件上传到Internet服务器时,我发现我无法上传三个扩展名为.csc的文件,即“ csc.exe”,“ vbc” .exe”和“ VBCSCompiler.exe”位于路径“ / Bin / roslyn”下。 I raised a ticket to my hosting provider net4india and they are saying that they don't allow .exe files to be uploaded on server as they may be potential viruses. 我向托管服务提供商net4india发出了一张罚单,他们说他们不允许.exe文件上传到服务器上,因为它们可能是潜在的病毒。 I had earlier developed this website on Visual Studio 2010 and was working perfectly fine on the hosting server also , but I wanted to make it responsive and I don't know how to use bootstrap, so I had choosen the template for ready-made coding, but now this is a big problem. 我之前在Visual Studio 2010上开发了该网站,并且在托管服务器上也能很好地工作,但是我想使其具有响应性,并且我不知道如何使用引导程序,因此我选择了现成的编码模板。 ,但是现在这是一个大问题。 I have googled a lot on this issue, but not found anything even near to what I am facing , even on stackoverflow. 我已经在这个问题上搜索了很多,但是即使在stackoverflow上,也没有找到任何与我正面临的东西接近的东西。 How can I resolve this issue ? 我该如何解决这个问题? Is any work-around possible for this like converting the .exe to .dll files or anything like that ? 是否有任何变通办法,例如将.exe转换为.dll文件或类似的东西? Please help. 请帮忙。

No hosting provider will allow you to run exe files. 没有托管服务提供商将允许您运行exe文件。 If you really want that, you should go for (virtual) dedicated server. 如果确实需要,则应使用(虚拟)专用服务器。

You can deploy even without Roslyn with no change in code. 您甚至可以在没有Roslyn的情况下进行部署,而无需更改代码。 Open NuGet Package Manager window and uninstall Microsoft.CodeDom.Providers.DotNetCompilerPlatform package and rebuild & republish. 打开NuGet软件包管理器窗口,然后卸载Microsoft.CodeDom.Providers.DotNetCompilerPlatform软件包,然后重新生成并重新发布。 This will solve your purpose. 这将解决您的目的。 Basically this will not generate any csc.exe, vbc.exe files inside bin folder. 基本上,这将不会在bin文件夹内生成任何csc.exe,vbc.exe文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 什么是 ASP.NET 提供程序? - What is an ASP.NET Provider? 为什么roslyn在ASP.NET C#类文件中引发RCS1110警告? - Why does roslyn throw a RCS1110 warning in ASP.NET C# class files? 具有ASP.NET C#,MS SQL Server和哪个托管解决方案的高可用性支付处理站点? - High availability payment processing site with ASP.NET C#, MS SQL Server and which hosting solution? asp.net 4.6中的Roslyn自动编译可能吗? - Roslyn auto- compilation in asp.net 4.6 possible? 是否可以使用 Roslyn 构建 ASP.Net Core Web 应用程序? - Is that possible to build an ASP.Net Core web application using Roslyn? 无法在asp.net中连接托管服务提供商MYSQL数据库 - Unable to connect hosting provider MYSQL database in asp.net 如何在ASP.NET MVC 5应用程序中使用Roslyn? - How Can I Use Roslyn in an ASP.NET MVC 5 App? ASP.NET WebApi-如何“允许”而不是“要求”客户端证书? - ASP.NET WebApi - How do I “allow”, but not “require” client certificates? 是否可以使用asp.net c#将.exe或.scr文件存储在sqlserver数据库中? - Is it possible to store .exe or .scr files in sqlserver database using asp.net c#? C#类库中的用户控件(asp.net,ascx文件),生成错误(aspnet_compiler.exe) - User Controls (asp.net, ascx-files) inside a C# class library, build error (aspnet_compiler.exe)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM