Asp.net 对路径“***”的访问被拒绝
Asp.net网站发布到IIS上,操作文件的时候发生‘System.UnauthorizedAccessException:对路径“***”的访问被拒绝’。
说明没有授予Asp.net对文件的写访问权,网上找了一下:
若要授予 ASP.NET 对文件的写访问权,请在资源管理器中右击该文件,选择“属性”,然后选择“安全”选项卡。单击“添加”添加适当的用户或组。突出显示 ASP.NET 帐户,选中所需访问权限对应的框。
结果在电脑上找了老半天,楞是没在文件夹属性里安全找到‘安全’这2字。。。那个汗啊!肯定是系统不同了。。。
没办法,继续找。。。。
又找了好久,终于还是被我找到了!
别人说的办法都是2000、2003下的,而我用的是XP的操作系统 在资源管理器—工具菜单—文件夹选项—查看标签下,把“使用简单文件共享”的勾去掉。
运行再试,成功!
相关文档:
using System;
using System.Data;
using System.Diagnostics;
using System.Collections.Generic;
using MySql.Data.MySqlClient;
namespace System
{
/// <summary>
/// Description of MySqlDBUtil.
/// </summary>
public class MySqlDBUtil
{
&nbs ......
写cookie
1 HttpCookie cookie = new HttpCookie("Info");//定义cookie对象以及名为Info的项
2 DateTime dt = DateTime.Now;//定义时间对象
3 TimeSpan ts=new TimeSpan(1,0,0,0);//cookie有效作用时间,具体查msdn
4 cookie.Expires = dt.Add(ts);//添加作用时间
5 cookie.Values.Add("user","cx ......
Parameter Queries in ASP.NET with MS Access
A selection of code samples for executing queries against MS Access using parameters.
Making use of the ASP.NET 2.0 datasource controls is fine, but it is important to understand how to manually create data access code. Best practice dictates that, at t ......
在后台用C#枚举控件不像javascript那么简单,HasControls只能抓到直属下级的控件,如果有多个div,table嵌套,就要递归了
public static void CloseAllContent(System.Web.UI.Control page,bool bOpen)
{
int nPageControls = page.Controls.Count ......
ASP.NET FCKeditor 文本编辑器的使用 【转】
下载地址:http://www.fckeditor.net/download
FCKeditor使用
一、配置
1、在www.fckeditor.net
点击Download,下载FCKEditor_2.5.1.zip和FCKEditor.Net(ASP.NET
Control to easily integrate FCKEditor on .Net Web pages.)
2、新建一项目,比如叫FCK。解压FCKEd ......