您的位置:程序门 -> .net技术 -> asp.net



高分求取web.config设置中值的问题??


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


高分求取web.config设置中值的问题??[已结贴,结贴人:shoulangwangyue]
发表于:2007-03-16 17:33:15 楼主
如何把视频文件上传到 <add   key= "tempfilepath "   value= "\\192.168.0.48\movie "   /> 中,之后再从中取到此视频文件
发表于:2007-03-16 17:37:531楼 得分:10
up
发表于:2007-03-16 17:38:442楼 得分:10
如果是取路径值是这样:
configurationmanager.appsettings[ "tempfilepath "];

不是要上传和下载的示例吧。
发表于:2007-03-16 17:38:533楼 得分:5
哇   这等问题!学习ing..
发表于:2007-03-16 17:39:094楼 得分:10
上传可以利用web   services
发表于:2007-03-16 17:41:185楼 得分:0
对啊   !那   如何再从此路径中取到视频文件呢?
发表于:2007-03-16 17:42:006楼 得分:0
它是放在页面上的
发表于:2007-03-16 20:40:497楼 得分:20
asp.net   2.0,在 <appsettings   /> 节的配置,可以这样读取:
<%$   appsettings:key   %>

例如:
<asp:label   text= ' <%$   appsettings:key   %> '   runat= "server "   />
发表于:2007-03-16 21:01:288楼 得分:15
你的电影如果大的话要加
    <system.web>
    <httpruntime   maxrequestlength= "409600 "   EXECutiontimeout= "60 "   apprequestqueuelimit= "100 "/>
    </system.web>

409600是文件上传的大小,默认我不记得了   反正很小就是了~~~~~~~这是4g应该够了~~
你要读的话代码里写
private   string   filename   =   system.configuration.configurationsettings.appsettings[ "tempfilepath "];
发表于:2007-03-16 21:34:319楼 得分:15
public   class   getconnstr
{
        public   static   string   value;
        static   getconnstr()
        {

                value   =   system.configuration.configurationmanager.appsettings.get( "tempfilepath ");
        }

}
发表于:2007-03-16 21:40:2310楼 得分:15
如果   不是一个服务器的话你要考虑使用共享方式或者ftp方式上传,至于下载完全可以让这个机器自己开一个web服务器


快速检索

最新资讯
热门点击