ASP将文件从一台服务器PC上传到另一台PC

编程入门 行业动态 更新时间:2024-10-26 05:33:51
本文介绍了ASP将文件从一台服务器PC上传到另一台PC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 大家好,如果有人可以帮助我,我将在一个大型的基础架构中运行一个服务台网站.刚刚添加了上传文件功能.该网站在服务器PC上运行,并且我试图将网站用户的文件上传到其他服务器PC,但我一直在获得拒绝权限的错误,有人可以帮助我吗? 昏暗的CallID,lConn,UserQuery,objcmd4,sqlText,intrecords callID =会话("ACallID") 昏暗的照片上载DirVar uploadsDirVar ="\\ spmrfnp1 \ Attachments \"& CallID&" 昏暗的myFSO ''将myFSO初始化为文件系统对象 SET myFSO = Server.CreateObject("Scripting.FileSystemObject") ''如果该文件夹尚不存在,则创建该文件夹 如果不是myFSO.FolderExists("\\ spmrfnp1 \ Attachments \"& CallID&")然后 myFSO.CreateFolder("\\ spmrfnp1 \ Attachments \"& CallID&") 设置lConn = Server.CreateObject("ADODB.CONNECTION") lConn.Open"Provider = sqloledb;数据源= AIWPH2CWESSELS;用户ID = GCLS;密码= GCLSMGR;初始目录= GCLS" 设置objCmd4 = Server.CreateObject("ADODB.Command") SQLText =插入[GCLS] .dbo.Attachments(CallID,FolderURL)值("& CallID&"'',"& UploadsDirVar&))" objCmd4.ActiveConnection = lconn objCmd4.CommandType =& H0001 objCmd4.CommandText = SQLText objCmd4.Execute intRecords 设置objCmd4 = Nothing lconn.close 如果结束 而且我知道asp在将网站移至asp的过程中即时性要好1000万倍,但他们希望在本周末之前做好准备 而且我没有创建网站,只能对其进行编辑 并且服务器位于相同的网络和相同的域上

解决方案

ASP显然是一场彻底的灾难. ASP.NET的性能要好1000倍.但是,如果要在服务器之间复制文件,则无法根据您所说的内容提供帮助.服务器是否在同一网络上?您在使用FTP吗?您的代码是什么样的?请编辑您的帖子并添加一些代码,以便我们帮助您进行修复. 确定,因此文件位于同一网络上.这样就不会出现代码问题,而在两台计算机之间也会有权限问题.

hi people if anyone can help me i am running a helpdesk website in a big infrastucture. just added a uploading files function. the website runs on a server pc and im trying to upload the files from the website users to a differnt server pc but i keep on getting a permission denied error can anyone help me please dim CallID,lConn,UserQuery,objcmd4,sqlText,intrecords callID = session("ACallID") Dim uploadsDirVar uploadsDirVar="\\spmrfnp1\Attachments\"& CallID &"" Dim myFSO ''Initialize myFSO as a file system object SET myFSO = Server.CreateObject("Scripting.FileSystemObject") ''If the folder does not already exist then create the folder If NOT myFSO.FolderExists("\\spmrfnp1\Attachments\"& CallID &"") Then myFSO.CreateFolder("\\spmrfnp1\Attachments\"& CallID &"") Set lConn = Server.CreateObject("ADODB.CONNECTION") lConn.Open "Provider=sqloledb;Data Source=AIWPH2CWESSELS;User Id=GCLS;Password=GCLSMGR;Initial Catalog=GCLS" Set objCmd4 = Server.CreateObject ("ADODB.Command") SQLText = "insert into [GCLS].dbo.Attachments (CallID,FolderURL) values (''"&CallID&"'',''"&UploadsDirVar&"'')" objCmd4.ActiveConnection = lconn objCmd4.CommandType = &H0001 objCmd4.CommandText = SQLText objCmd4.Execute intRecords Set objCmd4 = Nothing lconn.close End If and i know asp is 10000000 times better im in the process to take the website over to asp but they want this to be ready by end of the week and i didnt create the website only got it to edit it and the servers is on the same network and same domain

解决方案

ASP is, obviously, an utter disaster. ASP.NET is 1000 times better. However, if you''re copying files between servers, it''s impossible to help based on what you said. Are the servers on the same network ? Are you using FTP ? What does your code look like ? Please edit your post and add some code so we can help you fix it. OK, so the files are on the same network. So you don''t have a code issue, you have a permissions issue between the two computers.

更多推荐

ASP将文件从一台服务器PC上传到另一台PC

本文发布于:2023-10-09 18:46:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1476480.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:一台   另一台   服务器   文件   ASP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!