到目前为止,我们一直在我们的应用程序中使用Toasts,因为我们计划采用Support Design Library的一些新功能.我想知道Snackbar与Toast的推荐用法是什么.
我一直在谷歌材料snackbar doc上阅读.
Snackbars在移动设备和桌面左下方的屏幕底部的小弹出窗口中提供有关操作的轻量级反馈.它们首先是屏幕上的元素,包括FAB.
和祝酒词.
Android还提供了一个胶囊形状的吐司,主要用于系统消息传递.Toasts与snackbars类似,但不包含动作,不能在屏幕上滑动.
我明白他们做了什么但我有点困惑何时使用什么.这是否意味着:
此处发生此异常.您可以在IE11中重现它.到目前为止,我还没有找到问题的原因.有没有想过为什么会这样?
CSS3114:@ font-face失败OpenType嵌入权限检查.权限必须是可安装的.File:53d9eae5-63b4-48d7-a5b8-3419455028bb.ttf
该网站在Azure网站平台上运行,并使用ASP.NET MVC 5.
有没有办法实现调用URL http://mywebsite/myarea/mycontroller/myaction.xml
这基本上"假"请求文件,但结果将是一个动作操作,将服务于动态创建的文件?
我试过这个:
context.MapRoute(
"Xml_filename",
"Xml/{controller}/{action}.xml"
);
Run Code Online (Sandbox Code Playgroud)
但是只要URL中有filextension,路由就会失败并且表现就像我直接请求文件一样.
我怀疑这可能是因为使用扩展名更少的url处理程序.
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
Run Code Online (Sandbox Code Playgroud)
谢谢你的任何建议.
的Jakub
我正在编写一个Web API Web服务,它返回动态构造的属性包.是否有任何有效的序列化程序或如何将动态序列化为XML?我试图寻找任何好的建议,但没有发现任何可用的东西.
我们在我们的应用程序中使用C1 Azure Redis Cache.最近我们在GET操作上遇到了很多时间.
根据这篇文章,可能的解决方案之一是实现ConnectionMultiplexer对象池.
另一种可能的解决方案是在客户端中使用ConnectionMultiplexer对象池,并在发送新请求时选择"负载最小"的ConnectionMultiplexer.这应该可以防止单个超时导致其他请求也超时.
如何使用C#实现一个ConnectionMultiplexer对象池?
编辑:
我有一点"奇怪的练习"问题.对我们项目架构的要求是在WCF项目中使用(如果可能)所有MVC优势来设置Web API.这意味着WCF和Web API Web服务将在一个项目中相互站立.
这甚至可行吗?我已经给了它一个简短的发现,发现即使合并两个项目的网络配置也很困难.
感谢您的建议和意见,
的Jakub
在我们的项目中,我们使用以下nuget包:
Microsoft.SqlServer.Types
直到最近,一切都运行良好,没有我明显改变ASP.NET应用程序在以下异常开始时中断的任何重要事项:
加载msvcr120.dll发生错误(ErrorCode:5)
描述:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息.
异常详细信息:System.Exception:加载msvcr120.dll时出错(ErrorCode:5)
堆栈跟踪:
[例外:错误加载msvcr120.dll(错误码:5)]
SqlServerTypes.Utilities.LoadNativeAssembly(字符串nativeBinaryPath,字符串的AssemblyName)在E:\开发\雅各布\ ServerApi\SqlServerTypes\Loader.cs:43个
SqlServerTypes.Utilities.LoadNativeAssemblies(字符串rootApplicationPath)在E:\开发\雅各布\ ServerApi\SqlServerTypes\Loader.cs:28
Jacobo.ServerApi.WebApiApplication.Application_Start()中E:\开发\雅各布\ ServerApi\Global.asax.cs中:26[HttpException(0x80004005):加载msvcr120.dll时出错(ErrorCode:5)]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context,HttpApplication app)+529
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext,HttpContext context,MethodInfo []处理程序)+185
System.Web.HttpApplication.InitSpecial(HttpApplicationState状态,MethodInfo []处理程序,IntPtr appContext,HttpContext上下文)+172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext,HttpContext context)+421
System.Web.Hosting. PipelineRuntime.InitializeApplication(IntPtr appContext)+359[HttpException(0x80004005):加载msvcr120.dll时出错(ErrorCode:5)] System.Web.HttpRuntime.FirstRequestInit(HttpContext context)+534 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)+117
System.Web.HttpRuntime.ProcessRequestNotificationPrivate (IIS7WorkerRequest wr,HttpContext context)+726
应用程序在以下方法中断:
private static void LoadNativeAssembly(string nativeBinaryPath, string assemblyName)
{
var path = Path.Combine(nativeBinaryPath, assemblyName);
var ptr = LoadLibrary(path);
if (ptr == IntPtr.Zero)
{
throw new Exception(string.Format(
"Error loading {0} (ErrorCode: {1})",
assemblyName,
Marshal.GetLastWin32Error()));
}
}
Run Code Online (Sandbox Code Playgroud)
这是loader.cs的一部分,它是SqlServerTypes nuget包的一部分.
我检查了bin文件夹并找到了那里存在的SqlServerTypes程序集.我真的不确定这里出了什么问题.
我想实现以下目标:
避免在 Azure 上对我的生产配置进行SQL 身份验证,并使用Active Directory 集成身份验证
当我转到 Azure 的连接字符串部分并复制以下连接字符串时:
Server=[my server name];Initial Catalog=[my db name];Persist Security Info=False;User ID=[my user name];MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Authentication="Active Directory Integrated";
Run Code Online (Sandbox Code Playgroud)
并尝试使用它我得到以下异常:
异常消息:无法将“Authentication=Active Directory Integrated”与“用户 ID”、“UID”、“密码”或“PWD”连接字符串关键字一起使用。异常堆栈跟踪:位于 System.Data.SqlClient.SqlConnectionString..ctor(String ConnectionString)在System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(字符串connectionString,DbConnectionOptions之前)在System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey键,DbConnectionPoolGroupOptions poolOptions,DbConnectionOptions&userConnectionOptions)在System.Data.SqlClient.SqlConnection.ConnectionString_Set( DbConnectionPoolKey 键)
由于我的数据库管理/基础设施经验非常有限,我不知道为什么“用户 ID”在我在 Azure 上获得的连接字符串中明确列出时会破坏所有内容。
有几点需要注意:
azure azure-active-directory azure-sql-database azure-sql-server
似乎在我们的web.config中有太多绑定重定向,我要么:
这只是绑定重定向的某些部分的示例:
<dependentAssembly>
<assemblyIdentity name="Microsoft.Azure.KeyVault.Core" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.8.3.0" newVersion="5.8.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.8.3.0" newVersion="5.8.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.8.3.0" newVersion="5.8.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.2.1" newVersion="4.0.2.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" culture="neutral" />
<bindingRedirect oldVersion="10.0.0.0-11.0.0.0" …
Run Code Online (Sandbox Code Playgroud) 我一直在使用AutoMapper,它似乎得到了我所有的子实体(即使我没有在"Include()"子句中指定它们).是否有任何方法可以使延迟加载成为可能,并且只有在我指定它们时才获取子属性.
谢谢,
的Jakub
c# ×5
azure ×2
.net ×1
android ×1
asp.net ×1
asp.net-mvc ×1
automapper ×1
caching ×1
css ×1
css3 ×1
difference ×1
dynamic ×1
font-face ×1
fonts ×1
lazy-loading ×1
sql-server ×1
url ×1
wcf ×1
web-config ×1
xml ×1