客户端应用程序服务和 VSPackage
我目前正在开发一个 VSPackage,它将具有系统外部的一些登录功能,因此我想我会使用客户端应用程序服务。
我已经逐字逐句地遵循在线教程,但似乎无法让 VSPackage 返回 true 的以下内容:
Membership.ValidateUser("username", "password")
我创建了一个简单的 winforms 应用程序骨架,该应用程序在此调用中成功返回 true,表明成员资格在这里起作用。
但是,无论我选择什么用户名/密码,该调用都会在 VSPackage 上返回 false。据我所知,没有出现任何异常。
VSPackages 是否存在某些限制?我也在包内运行了 LINQ-to-SQL,并且数据库调用工作正常,所以我很困惑为什么它没有按预期工作。
VSPackage 和 Winforms 应用程序共享相同的 app.config 文件。
有什么想法吗?
干杯, 米格
I'm currently developing a VSPackage, and it will have some log-in functionality external to the system, so I thought I would use Client Application Services.
I have followed online tutorials word for word and cannot seem to get a VSPackage to return true for the following:
Membership.ValidateUser("username", "password")
I have created a simple skeleton winforms application that succesfully returns true on this call, showing that membership is working here.
However, the call simply returns false on the VSPackage no-matter what username/password I choose. There are no exceptions thrown from what I can see.
Is there a limitation somewhere due to VSPackages? I have LINQ-to-SQL running inside the package also and the DB calls work fine, so I am baffled as to why it isn't working as expected.
Both the VSPackage and Winforms app share the same app.config files.
Any Ideas?
Cheers,
MiG
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于任何感兴趣的人,我改用 Windows 身份验证而不是表单。 VSPackages 似乎完全忽略了 app.config,并且在互联网上找不到太多关于原因的信息。
For anyone interested, I switched to using Windows Authentication instead of Forms. It seems app.config is ignored entirely by VSPackages and couldn't find much on the internet as to why this is.