var competitive=new {technique,business}
显示标签为“问题解决”的博文。显示所有博文
显示标签为“问题解决”的博文。显示所有博文

2008/6/20

Trick

整理一下以前遇到的问题:

1,编写bal层时有时会忘了关闭连接,使用一下方法可以查看是否有未关闭的连接:在.net程序中如果未明确设置connectstring中的Pooling为false,即使使用close关闭连接后仍然保持了部分连接,如果想测试是否有未关闭的连接应该先将该参数设为flase然后再smms中执行sp_who查看是否执行完数据操作后仍有连接。

2,将jquery的脚本最好引用到网页的尾部,如果在head中引入有时不会报错但是代码不会运行。

3,Google Toolbar官网上的xpi无法在firefox3下使用,在网上找到一个下载链接可以使用。

4,项目中需要自动将文件下载到本地处理为了突破安全设置需要使用插件,由于对COM不熟就查找使用.net的方案,在codeproject上找到了这篇详细介绍BHO编写的文章,稍微改造使用System.Net下的类实现的文件的下载,遇到两个问题一个是网络流无法获得长度需要边获得边写入文件,另一个问题时在下载时网页会假死使用另一个线程下载也没有解决还需要研究一下。

5,使用googlecode做网络存储比较好用,一方面可以获得外部链接另一方面在本地使用小海龟可以很方便的提交和获得文件。啥时候能真正的建立一个开源项目...

6,Evernote出了网络版试用了一下感觉没有googlenotebook好用,当粘贴的文档内容过大时不报错但是内容没有保存。如果你需要邀请请给我发邮件!

ps:在使用live writer发表这篇文章时一直报错上网一看blogger也被GFW屏蔽了,只好使用VPN发表推荐一下这个VPN软件hotspot.

2008/4/1

Word Interop With ASP.Net Problem

程序中要实现从用户上传的word文件中提取文本信息的功能,原来在本机正常运行但是部署到iis上后上传word文件后页面就停止没有反应了,刚开始是报无法创建activex控件的错误,根据google到的更改方法进行修改搞定(运行dcomcnfg.exe,在组件服务中设置word组件的启动与激活给network service:2003下),跟踪调试没有报任何错误单页面还是没有反应 ,使用process explorer 发现两种情况下启动的word程序的权限不同,google了许久在asp form上发现了这篇文章,顺藤摸瓜找到如下两篇文章:如何将 Office 应用程序配置为在交互式用户帐户下运行,服务器端 Office 自动化注意事项,我将word组件的标识权限设为管理员后程序能够正常运行,但是如果用户上传的文件中带有破坏性的宏命令后果就比较严重了。

2007/5/17

Arcgis Server 安装

安装完arcgis server后新建了一个web map application,但是启动后报运行时错误。运行其他程序也出现了运行时错误。误以为是iis出了问题重装asp.net(aspnet_regiis -i),重启动原有程序报找补不到资源错误,baidu一下原来在2003下asp.net扩展默认不是允许的(晕)。开启后将配置文件中的customErrors 的mode属性改为Off,原来是全局web.config中esri提供的httphandle后多出了一个xmlns属性,去掉该属性F5运行通过。

2007/5/3

IIS启动问题

   今天想在本地学习一下Google Map API,可是iis无法启动,点击依赖选项卡提示rpc服务器不可用,上网google发现是DCOM Server Process Launcher服务没启动(昨晚精简服务时给关了)。再启动提示文件在被使用,使用事件查看器查看,有两条提示:
不能为 0.0.0.0:80 绑定到下面的传输。IP 仅侦听列表可能包含到一个接口的引用,该接口在此计算机上不存在。数据字段包含错误号。
不能为站点 '1' 注册 URL 前缀“http://:80/”。此站点被解除活动状态。数据字段包含错误号。
运行cmd,输入netstat -ano发现有一个程序占用了80端口,用process explorer查看原来是迅雷占了80端口。真不知道迅雷要占80端口干嘛?

2007/4/22

Server Application Error详细解决办法

1,对于asp程序参考:
http://www.tongyi.net/article/20040928/200409284127.shtml
2,对于asp.net程序参考:
As a last resort, you can re-create the IIS packages. To do this, follow these steps:
Browse to Component Services and delete the following packages:NOTE: To delete the packages, you must first open the properties of the package, click the Advanced tab, and then click to clear the Disable Deletion check box.
IIS In-Process Applications
IIS Out-of-Process Pooled Applications
IIS Utilities
Open a command prompt, and then use the following command to switch directories:
cd %windir%system32inetsrv
Run the following commands:
rundll32 wamreg.dll, CreateIISPackage
NOTE: "CreateIISPackage" must be typed exactly; it is case-sensitive.
regsvr32 asptxn.dll
Close and reopen Component Services. You should see all three IIS COM+ applications that have been recreated.
Run IISRESET from a command line and test any ASP page that previously did not load correctly.

启动用户实例的进程时出错[zz]

原文:http://483sr2kpr3b9.spaces.live.com/PersonalSpace.aspx?_c02_owner=1

我 相信很多人在使用ASP.NET 2.0 + SQL2005 + aspnetdb(MemberShip等功能)时出现这个问题:“由于启动用户实例的进程时出错,导致无法生成 SQL Server 的用户实例。该连接将关闭。”,其英文版本的相同问题的错误信息是:“Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.”
我花了将近3天的时间,终于找到了答案!原来这是微软的bug,并且微软已经承认,详情如下:http://support.microsoft.com/?id=896613
出现此错误的条件是:你用过远程桌面连接,并且安装了SQL2005+VS2005,就有很大可能触发这个问题,微软说会在将来的XP SP3里面解决掉这个问题,要想立即解决这个问题,需要交费…… - -6
不用理会SB M$,咱们自有土办法来解决,请看如下文章:http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=128707&SiteID=1
如 果你看不懂英文,那么我告诉你我的解决办法:删除C:Documents and Settings[USERNAME]Local SettingsApplication DataMicrosoftMicrosoft SQL Server DataSQLEXPRESS目录即可,[USERNAME]是Windows用户名,比如说Administrator
综上所述,为了防止大家像我一样郁闷,特将我的经验公开,谢谢捧场~

server2003+ii6 编译器错误信息:CS0016: 未能写入输出文件解决方案


安装Quick Start后出现错误CS0016,解决方法:
1,重新安装试试。
2,修改windows\temp或Temporary ASP.NET Files文件夹的权限使net services具有写入修改权限。
转:

解 决:编译器错误信息: CS0016: 未能写入输出文件“c:WINDOWSMicrosoft.NETFrameworkv1.1.4322Temporary ASP.NET Fileslistenleaksae3daa38e9fdb67zaie9ij.dll”--“拒绝访问。 ”

一、http://support.microsoft.com/default.aspx?scid=kb;en-us;329065#

PRB: Access Denied Error When You Make Code Modifications with Index Services Running

RESOLUTION

If you do not use Index Server on the server, you can disable it. To do so, follow these steps:
1. Click Start, and then click Services.
2. Locate Indexing Service from the list of services, and then click Indexing Service Properties from the subform.
3. On the General tab of the Indexing Service Properties dialog box, in the Startup type drop-down item list, click Disabled.
4. Click OK.

If you use Index Server, you can exclude the Temporary ASP.NET Files directory from the folders that the Index Server scans. To do so, follow these steps:
1. Click Start, point to All Programs, point to Administrative Tools, and then click Computer Management.
2. Expand the Services and Applications node, expand the Indexing Service node, and then expand the System node.
3. Right-click the Directories folder, point to New, and then click Directory from the subform to open the Add Directory dialog box.
4. Click Browse, and then locate the Temporary ASP.NET Files directory. You typically find the Temporary ASP.NET files in the following path: c:Microsoft.NETFrameworkTemporary ASP.NET Files
Note is the version of .NET Framework installed on your computer.
5. Click No under the Include in Index? option buttons.
6. Click OK to close.
7. Close the Computer Management dialog box.
8.

Restart the Indexing Services service.

二、

另 外还有一个 Access denied 的错误说是不能访问 C:WINDOWSMicrosoft.NETFrameworkv1.1.4322Temporary ASP.NET Files 下的某个目录。产生这些错误的原因很多,主要的可能包括:Bin 目录或者 Web.config 被更改以及访问文件系统的权限不够。

如果 Bin 目录或者 Web.config 被更改,MSDN 网站上有文章说是因为 Microsoft Index Services(Indexing Service) 服务在运行。详细内容可以访问: PRB: Access Denied Error When You Make Code Modifications with Index Services Running 。

但是另外还需要注意一些别的问题,

  • 检查 Bin 目录的文件系统访问权限。一般只要确保 Users 容器拥有“读取和运行”、“列出文件夹目录”和“读取”的权限就可以了。
  • 如 果提示说不能访问 C:WINDOWSMicrosoft.NETFrameworkv1.1.4322Temporary ASP.NET Files... ,可以将 Temporary ASP.NET Files 目录的访问权限列表中添加 Everyone,并设置为拥有所有的权限。然后在访问一次此 Web 应用程序后,将 Temporary ASP.NET Files 目录的访问权限列表中将 Everyone 删除就可以了。

综上所述的方法,主要包括:

  • 禁用或设置 Indexing Service 服务;
  • 检查 Bin 目录的访问权限;
  • 设置 Temporary ASP.NET Files 目录的访问权限。

三、在 Windows2003 下(IIS6),用 VS2003 生成一个 asp.net 应用,然后 F5 进行调试,出现如下错误信息:

“/0124”应用程序中的服务器错误。

编译错误 说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。

编 译器错误信息: CS0016: 未能写入输出文件“e:WINDOWSMicrosoft.NETFrameworkv1.1.4322Temporary ASP.NET Files124fea90a4b69167562pw09que0.dll”--“拒绝访问。 ”
源错误:版本信息: Microsoft .NET Framework 版本:1.1.4322.2032; ASP.NET 版本:1.1.4322.2032

我于是用“WINDOWSMicrosoft.NETFrameworkv1.1.4322Temporary ASP.NET Files”在msdn以及网上搜了一把,搜到两种解决方案:

修改该目录的权限,加上“NETWORK SERVICE”,让它对该目录有控制权限。
修改IIS服务的缺省账户为“本地系统”
经验证,方法二可行,方法一失败。(yzt_andyamy采用方法一却成功了!)但是方法二会导致IIS运行不安全,所以这种方法不太合适。

后来我查看了别人的配置,发现人家IIS服务的缺省账户都是“网络服务”,这就说明我的机器的权限设置在某个地方存在差异。但是问题出在哪里呢?我遍查MSDN和Google/baidu也没有找到答案。

后来不知道抽了哪根筋,灵光一闪,看看 WindowsTemp 的权限设置,把 “NETWORK SERVICE”的权限设置为“控制”级别,再试试Debug,成了!

真是见鬼!难道说这是Windows的一个BUG?还是我的哪个地方的设置出现了问题?

==上面是一个GG的BLOG,偶按照他的方法,设置了 WindowsTemp 的权限,结果好了。
莫名其妙。