如何调试SharePoint 2013中使用的类库 [英] How do I debug a class library that is used in SharePoint 2013

查看:129
本文介绍了如何调试SharePoint 2013中使用的类库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按照本指南使用自定义成员资格和角色提供程序为基于声明的SharePoint 2010 Web应用程序创建基于表单的身份验证。



< a href =https://msdn.microsoft.com/en-us/library/office/gg317440(v=office.14).aspx> https://msdn.microsoft.com/en-us/library/ office / gg317440(v = office.14).aspx [ ^ ]



从我的理解,dll,编译并放入GAC当用户尝试登录或人员选择器正在搜索用户时,将由中央管理,Web应用程序和安全令牌服务中的web.config文件调用。我想知道如何设置调试模式,以便我能够单步执行代码?我是否需要创建一个空白的SharePoint项目并在其中添加类文件以首先部署解决方案?无论如何我在哪里部署解决方案?

I'm trying to follow this guide in creating a Forms-Based Authentication for Claims-Based SharePoint 2010 Web Applications Using Custom Membership and Role Providers.

https://msdn.microsoft.com/en-us/library/office/gg317440(v=office.14).aspx[^]

from what i understand, the dll, when compiled and put into the GAC will be called by the web.config file in the central administration, web application and Security Token Service when user is trying to login or when the people picker is searching for the user. i want to know how do i set up a debugging mode so that i will be able to step through the code? do i need to create a blank SharePoint project and add the class files inside to deploy the solution first? Where do i deploy the solution to anyway?

推荐答案

类文件应该按预期工作,因为只要你的代码正常工作,GAC / bin就没关系了,<在调试之前确保你的dll是gac已部署并且你有web-config条目并在服务器中执行iisreset并在你的应用程序中打开SharePoint页面,现在转到部署了dll的服务器并在该系统中打开项目选择调试菜单表单VS并附加到进程并选择所有 W3Wp进程并附加u代码应该处于调试模式
class files should work as expected ,since it does not matter GAC/bin as long as ur code is working,

before debugging make sure ur dll is gac deployed and u have web-config entry and do an iisreset in the server and open the SharePoint page in ur app , now go to ur server where the dll is deployed and open the project in that system select debug menu form VS and attach to process and seelct all W3Wp process and attach u code should be in debug mode


这篇关于如何调试SharePoint 2013中使用的类库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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