客户端应用程序服务和 VSPackage

发布于 2024-08-21 08:09:56 字数 492 浏览 2 评论 0原文

我目前正在开发一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

世界和平 2024-08-28 08:09:56

对于任何感兴趣的人,我改用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文