Asp.net 软件列表

升级NET6.0后报错InvalidOperationException: The view 'Index' was not found
Asp.net

升级NET6.0后报错InvalidOperationException: The view 'Index' was not found

2022-02-14 标签:InvalidOperationException,升级NET6.0,The view Index found,视图,asp.net,core2.1,Microsoft,AspNetCore,Razor,Design

今天将asp.net core2.1升级到NET6.0后报错:InvalidOperationException: The view 'Index' was not found.如图:大概意思就是Index视图没有找到导致出错,仔细看了,视图是有的.网上找了很多方法都没有用.最后折腾半天,发现之前升

NET6报错A relational store has been configured without specifying either the DbConnection or connection string to use
Asp.net

NET6报错A relational store has been configured without specifying either the DbConnection or connection string to use

2022-01-28 标签:NET6,报错,A,relational,store,configured,without,specifying,either,DbConnection,connection,string,use,MysqlContext,options,ConnectionString,版本,asp.net,core6.0

今天在将项目升级到asp.net core6.0后发现报错A relational store has been configured without specifying either the DbConnection or connection string to use.项目使用的数据库是My

ubuntu asp.net core读取appSettings.json问题
Asp.net

ubuntu asp.net core读取appSettings.json问题

2022-01-28 标签:ubuntu,asp.net core,appsettings.json,问题,dotnet,appSettings,Value cannot be null,Hangfire.MySql.MySqlStorage,ubuntu appSettings

今天在ubuntu发直接运行命令dotnet /var/www/down/Down.Web.dll发现报错Value cannot be null. (Parameter 'connectionString') at Hangfire.MySql.MySqlStorage等.起初还以为是配置有问题,

C#net core报Keys will not be persisted to storage
Asp.net

C#net core报Keys will not be persisted to storage

2022-01-22 标签:C#,net,core,Keys,persisted,storage,存储,Using,repository,HKLM,应用程序,密钥,注册表,用户,修改,配置文件,memory,Neither

今天在查看网站日志的,看到警报:Using an in-memory repository. Keys will not be persisted to storage.Neither user profile nor HKLM registry available. Using an epheme

VS发布asp.net core项目在web.config包含production环境变量
Asp.net

VS发布asp.net core项目在web.config包含production环境变量

2022-01-22 标签:VS,发布,asp.net,core,项目,web,config,包含,production,环境变量,EnvironmentName,PropertyGroup,设置,配置文件,文件,Visual,Studio,2022,NET6.0

今天在用Visual Studio 2022发布NET6.0或者说asp.net core发布时,在web.config包含production或者Development,VS在发布时替换asp.net core中的web.config

vs2019发布报错该项目中不存在目标“GatherAllFilesToPublish”
Asp.net

vs2019发布报错该项目中不存在目标“GatherAllFilesToPublish”

2021-05-18 标签:vs2019,GatherAllFilesToPublish,Microsoft,Import,Project,targets,VSToolsPath,Condition,VisualStudioVersion,MSBuildBinPath,CSharp,PropertyGroup

用VS2019打开一个以前用VS2010写的asp.net项目报错GatherAllFilesToPublish后,设置好发布选项(发布到文件夹),发布的时候报错如图:

asp.net Invalid non-ASCII or control character in header
Asp.net

asp.net Invalid non-ASCII or control character in header

2021-01-10 标签:asp.net,Invalid,non,ASCII,control,character,header,Response,Redirect,Uri,EscapeUriString,字符,跳转,0x7F16,OK,url,编码,后端,链接

今天进行asp.net后端Response.Redirect跳转的时候提示错误:Invalid non-ASCII or control character in header: 0x7F16.大概的意思是包含了非ASCII字符即非法字符.那么如何解决了,很简单,将链接用Uri.Esca

asp.net mvc 全局设置JsonRequestBehavior.AllowGet
Asp.net

asp.net mvc 全局设置JsonRequestBehavior.AllowGet

2020-07-21 标签:asp.net,mvc,全局,设置,JsonRequestBehavior,AllowGet,public,Behavior,result,class,filterContext,Controller,如下,private,get,set,override

asp.net mvc 全局设置JsonRequestBehavior.AllowGet,代码如下:public class JsonRequestBehaviorAttribute : ActionFilterAttribute{private JsonRequestBehavior Behavi

swagger自定义api文档方法的注释对象
Asp.net

swagger自定义api文档方法的注释对象

2020-07-21 标签:swagger,自定义,api,文档,方法,注释,对象,IEnumerable,Entities,Reces,返回,定义,代码,生成,asp.net,web,SwaggerResponse,HttpStatusCode,OK,data

asp.net web api 的swagger方法的自动生成的api文件都是默认是返回对象的实体注释,有没有办法自己定义这个对象呢,这个肯定是有的啦,swagger开发者早想到这种情况了.swagger自定义api文档方法的注释对象代码如下:其中 [SwaggerResponse(Ht