日期:2014-05-16  浏览次数:20404 次

asp.net使用短信猫(sms.dll)发送信息失败,winForm成功
如题,通过winform则发送信息成功,使用asp.net时,可以连接成功,但是发送短信失败,
使用以下解决方式均无效:
1,web.config;添加<identity impersonate="true" userName="xxx" password="xxx"/>;??可以连接到设备,应该不是权限问题啊???
2.生成将一个winform类调用sms.dll,实现“连接”与“消息发送",将其生成为一个dll,然后asp.net引用 这个dll,可以连接,但发送消息失败.
-------------------引用的sms.dll函数-------------------------
[STAThread]

[DllImport("sms.dll", EntryPoint = "Sms_Connection")]
public static extern uint Sms_Connection(string CopyRight, uint Com_Port, uint Com_BaudRate, out string Mobile_Type, out string CopyRightToCOM);

[DllImport("sms.dll", EntryPoint = "Sms_Disconnection")]
public static extern uint Sms_Disconnection();

[DllImport("sms.dll", EntryPoint = "Sms_Send")]
public static extern uint Sms_Send(string Sms_TelNum, string Sms_Text);

---------------------------------------------
在此向各位坛友求助,不盛感激!!!
------解决方案--------------------
试试开一个线程来发送看看
线程执行的方法设置【STAThread】
------解决方案--------------------
猫是放在服务器上吧



------解决方案--------------------
我刚做了一个短信发送的,不过我使用的是他们提供的webservice,这个比较好用的。你和短信提供商要webservice吧。dll,貌似不太好用,也没给web端的demo。