我想在cshtml文件上显示图像.垃圾邮件过滤器阻止我输入图像的HTML.但是源设置为
src= "@Html.Encode(Model.PictureLocation)" alt="IMAGES"
Run Code Online (Sandbox Code Playgroud)
在viewsource中,它显示为
src= "C:\Documents and Settings\xxx\My Documents\Visual Studio 2010\Projects\MVC\TIQC_ServerInterface\TIQC_ServerInterface\uploads\FileUpload12011_03_02_11_49_22.jpg" alt="IMAGES"
Run Code Online (Sandbox Code Playgroud)
图像存在于src路径中提到的位置.
执行时,页面不显示图像.如果这里有什么问题,请告诉我们?
我正在使用MVC3并将用户身份验证放在web.config文件中.这是绕过sqlserver身份验证.
web.config中的代码如下:
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" >
<credentials passwordFormat="Clear">
<user name="test123" password="test123" />
</credentials>
</forms>
</authentication>
Run Code Online (Sandbox Code Playgroud)
我尝试使用提到的用户ID和密码登录,我在页面中收到错误
登录失败.请更正错误,然后重试.
* The user name or password provided is incorrect.
Run Code Online (Sandbox Code Playgroud)
当我调试到AccountController.cs文件时,失败的MembershipService.ValidateUser(model.UserName, model.Password)方法.
我正在尝试部署我的MVC应用程序,但在TFS构建中,我收到此错误消息;
CSC:致命错误CS0042:创建调试信息文件'c:\ Builds\2\STAS\STAS\Sources\Documents and Settings\jyothisrinivasa\My Documents\Visual Studio 2010\Projects\STAS\STAS\_ obj\Debug\STAS时出现意外错误.PDB' - 'c:\ Builds\2\STAS\STAS\Sources\Documents and Settings\jyothisrinivasa\My Documents\Visual Studio 2010\Projects\STAS\STAS\_ obj\Debug\STAS.pdb:访问被拒绝.
我从我的应用程序中排除了Debug目录,为什么我得到这个?