随笔分类 -  c#

VS加载项目时报错:尚未配置为Web项目.指定的本地IIS URL http://localhsst/..要打开项目,需要配置虚拟目录 。是否立即创建虚拟目录
摘要:在项目目录下的.vs文件夹下,打开对应config文件夹,修改applicationhost.config 在<sites></sites>节点下对应的site节点删除掉即可。 <sites> <site name="WebSite1" id="1" serverAutoStart="true"> 阅读全文
posted @ 2020-06-22 14:29 站在那看风景 阅读(321) 评论(0) 推荐(0)
c# EncryptDES DecryptDES
摘要:using System; using System.IO; using System.Security.Cryptography; using System.Text; namespace ClassEncrypt { internal class Class1 { private static byte[] Keys = new byte[8] { (byte) 18, (byte) 52, 阅读全文
posted @ 2019-09-09 16:55 站在那看风景 阅读(1122) 评论(0) 推荐(1)
C# 随机验证码
摘要:using System; using System.Drawing; using System.Drawing.Imaging; using System.Text; namespace SystemScan { public class Recaptcha { private Random rand; public Bitmap CreateImage(out string code) { t 阅读全文
posted @ 2019-09-05 10:30 站在那看风景 阅读(140) 评论(0) 推荐(0)
C#连接SAP获取RFC函数数据 中文乱码变为#问题
摘要:本文主要记录C#这边的代码,至于SAP那边的操作不做讨论。 C#连接SAP获取RFC函数数据,一般有两种方法。 一开始使用的COM组件来访问SAP,开发时安装好SAP,这样通过COM引用Interop.SAPFunctionsOCX.dll、Interop.SAPLogonCtrl.dll、Inte 阅读全文
posted @ 2018-04-20 10:17 站在那看风景 阅读(1298) 评论(0) 推荐(0)
ASP.NET使用COM组件调用OUTLOOK2016发送邮件
摘要:一个简单的例子,主要点在于outlook的设置. 程式很简单,在debug时能正常发送邮件,但是在发布到IIS后却不能正常发送邮件。 那么就需要设置Component Services... 注意使用comexp.msc -32 命令打开 具体可参考http://www.cnblogs.com/al 阅读全文
posted @ 2017-11-01 08:28 站在那看风景 阅读(1248) 评论(0) 推荐(0)