摘要:- How to make a Windows Phone 8 app with Windows Azure Mobile ServiceWindows Azure Mobile Service推出已经有一段时间了,这可能是这段时间以来Windows Azure上最受关注的一个Feature,试用了一下Mobile Service,觉得还不错,分享下试用的过程,供大家参考。新建一个Mobile Service1. 登陆到Windows Azure Portal,创建一个Mobile Service2. 创建一个Mobile Service:MyTodos,并为之新建一个数据库,注意数据库服务器
        阅读全文
        随笔分类 - C# and .Net
摘要:安装完Report Viewer 10 (2010) 后到目录“C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\ReportingServices” 下修改Microsoft.ReportingServices.targets文件将第一行“<UsingTask TaskName="Microsoft.Reporting.RdlCompile" AssemblyName="Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, 
        阅读全文
        
摘要:什么是Build Action? Build Action is how the file relates to the build and deployment processes.在Visual Studio 2010的Windows Phone工程中, 有多个build action。它们之间有什么区别呢? * None: 此文件不参与编译也不被输出。比如:工程中的文档文件, readme.txt。* Compile: 参与编译并输出。主要是代码文件。* Content: 不参与编译,但会被输出。* Embedded Resource: 此文件被嵌入到主工程生成的DLL或exe中。主要是
        阅读全文
        
摘要:Asp.Net MVC项目在编译代码同时编译View,需要手动修改Project文件。用Notepad或其他文本编辑器打开Project文件,或者直接在Visual Studio中Unload project,然后右键点Project,选择Edit Project菜单,将MvcBuildViews改为true,如下:<MvcBuildViews>true</MvcBuildViews>修改后保存并Reload project,此时编译代码的同时也会编译各个View。如果出现如下编译错误Error 47 It is an error to use a section re
        阅读全文
        
摘要:使用Azure SDK 1.6 ,在Web Role和Worker Role里加载Azure Drive没问题。但是在VM Role里加载会出现以下错误:CloudDriveException 0x80070103 When Using Windows Azure Drive from a VM Role和微软的Andrew Edwards 讨论,发现是驱动的问题,需要手动安装驱动。The workaround for this issue has been published to MSDN:http://msdn.microsoft.com/en-us/library/windowsazu
        阅读全文
        
摘要:Blob 服务提供二进制文件和文本文件的存储。通过Blob的 REST API 能够访问2种资源:Containers和Blobs。容器可以看做包含多个文件的文件夹,而blob便是属于某个容器的文件。有如下2种blob:Block Blobs: 该类型用于流式访问。Page Blobs:该类型用于随机读写操作,能够向blob中写入一部分字节。Block Blobs可以通过2种方法创建。 不超过64MB 的Block blobs 可以通过调用Put Blob操作进行上传。大于64 MB的 Block blobs 必须分块上传,每块不超过4MB。当所有的分块成功上传之后,通过调用Put Block
        阅读全文
        
摘要:发布Asp.Net MVC项目需要注意修改project references中的Copy local。测试环境:Window Server 2008 + .Net 4.0 + IIS7+ SQL Server 2008问题:编译好的发布包导入IIS7 后,通过浏览器browse web site,出现cannot load assembly system.web.helpers / system.web.mvc / system.web.razor 等在服务器的GAC中也找不到相应的程序集解决办法:修改一下MVC相关程序集的copy local属性为true:Microsoft.Web.In
        阅读全文
        
摘要:Compiler Error Message: CS0016: Could not write to output file - Access is denied.Description:An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.Compiler Error Message: 
        阅读全文
        
摘要:Web服务器与客户端不在一个时区,显示客户端时间就需要计算与客户端的时差。在服务端存储UTC时间:C#:DateTime date = DateTime.UtcNow;在客户端显示时间时需要取得客户端时区:JavaScript:timeOffset = (new Date()).getTimezoneOffset();(返回以分钟为单位与UTC的时差)在客户端页面显示时间:date=date.AddMinutes(-1 *timeOffset);
        阅读全文
        
摘要:MVC中客户端传值到服务器端时,如果客户端字符串含有“</>"字样时就会报“检测到有潜在危险”("A potentially dangerous Request.Form value was detected from the client")的错误。 如:从客户端("test<br/>ttt")中检测到有潜在危险的 Request.Form 值。 解决方法A:在对应的Action加上[ValidateInput(false)]属性就可以解决,去除验证。但似乎在.NET 4.0这个属性不工作,所以在web.config中
        阅读全文
        
摘要:异步邮件阻塞MVC请求问题代码如下:public class EmailHelper { private MailHost mailHost = null; private HttpContext context; public event SendMailComplete SendComplete; private SmtpClient client; public EmailHelper() { context = HttpContext.Current; client = new SmtpClient(); mailHo...
        阅读全文
        
摘要:// program.cs // PerfTimer 及 测试程序 Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->using System; using System.Collections.Generic; using Syst...
        阅读全文
        
                    
                
                
浙公网安备 33010602011771号