Windows Server 2003上的C#程序 [英] C# program on windows server 2003

查看:110
本文介绍了Windows Server 2003上的C#程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我自己的计算机上开发了一个简单的自动备份程序,操作系统是windowsxp,自动将sqlserver的备份文件作为附件邮寄。我的计算机上的一切都没问题,但是在我的服务器上部署程序后,操作系统是Windows Server 2003,有一个异常被捕获,发送邮件失败。我改变了代码,我发现服务器2003上的程序没问题,那些大小小于3MB,大于3MB的文件,程序将无法提供文件。



我已经确认电子邮件提供商没有问题,因为该程序在windowsxp上没问题,即使附件超过3MB。我想知道服务器2003上是否有任何设置限制了这个功能。



请帮忙。非常感谢。

Developed a simple auto-backup program on my own computer, OS is windowsxp, mail the backup file of sqlserver automatically as an attachment. Everything is alright on my computer, but after I deployed the program on our server, OS is windows server 2003, there is an exception caught, failure sending the mail. I changed the code, I found out that the program is ok on server 2003 for those files which size are smaller than 3MB, more then 3MB, the program will fail to deliver the file.

I have confirmed that there is no problem on the e-mail provider because the program is alright on windowsxp, even the attachment is more then 3MB. I wonder if there are any settings on server 2003 limited the function.

Please help. Many thanks.

推荐答案

该限制通常由用于发送邮件的邮件服务器强加。附件只能这么大,通常10MB是base64编码形式,比原始附件大。
The limitation is usually imposed by the mail server used to send the mail. Attachments can only be so big, usually 10MB is base64 encoded form, which is bigger than the original attachment.


停止服务IIS ADMIN SERVICE。

然后打开文件%system%\system32 \inetsrv \MetaBase.xml



将ASPMaxRequestEntityAllowed\AspRequestQueueMax\AspBufferingLimit的值更改为您想要的大小(upload \\ t \\ upload \download)



重启系统并恢复iis admin servicem,一切都应该没问题。
Stop service IIS ADMIN SERVICE.
Then open the file %system%\system32\inetsrv\MetaBase.xml

change the value of ASPMaxRequestEntityAllowed\AspRequestQueueMax\AspBufferingLimit to the size you want(upload\upload\download)

reboot the system and restore iis admin servicem, everything should be ok then.


这篇关于Windows Server 2003上的C#程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆