Visual Studio 2008 - Breakpoint目前不会被击中。(Visual Studio 2008 - Breakpoint will not currently be hit. No executable code is currently loaded at this function)
我正在使用Visual Studio 2008 for WINCE7 for colibri board。 每当我把断点调试我的代码。 断点被禁用当我将光标放在喙点上时,我收到了这条消息: -
Breakpoint will not currently be hit. No executable code is currently loaded at this function
我可以在互联网上找到的唯一解决方案就是这样 。 但是这个解决方案不起作用。 除此之外,我重新启动我的电脑,删除,pdb文件,在某处复制我的项目并重建它。 但没有什么帮助。 这个问题有什么可能的原因,我该如何解决它。这里是实际场景的形象: -
I am using Visual Studio 2008 for WINCE7 for colibri board. Whenever I put breakpoints to debug my code. Breakpoint become disabled an I got this message when I put cursor on beak point:-
Breakpoint will not currently be hit. No executable code is currently loaded at this function
The only solution I can find on internet is this. But this solution is not working. Apart from this I restart my PC, delete ,pdb files, Copy my project somewhere and rebuild it. But nothing really helps. What can be possible reasons for this issue how can I solve it.Here is the image of actual scenario:-
原文:https://stackoverflow.com/questions/50699824
最满意答案
我可以通过使用HttpBasicAuthentication来实现这一点。 这是代码片段 -
public class TokenHelper { private static Logger logger = LoggerFactory.getLogger(TokenHelper.class); private static final int HTTP_TIMEOUT_MILISEC = 100000; private static String lineSeparator = System.getProperty("line.separator"); @Value("#{'${hostname}'}") private String hostName; @Value("#{'${port}'}") private int port; @Value("#{'${contextpath}'}") private String contextPath; @Value("#{'${isbasicauthentication}'}") private boolean isBasicAuthentication; @Value("#{'${username}'}") private String basicAuthenticationUserName; @Value("#{'${userpassword}'}") private String basicAuthenticationPassword; public Map<String, String> getLtpaToken() throws Exception { Cookie[] cookies = null; Protocol protocol = null; Map<String, String> cookiesMap = new HashMap<String, String>(); GetMethod method = new GetMethod(); HttpClient client = new HttpClient(); method.getParams().setSoTimeout(HTTP_TIMEOUT_MILISEC); protocol = new Protocol("http", new DefaultProtocolSocketFactory(), getPort()); if (isBasicAuthentication) { client.getParams().setAuthenticationPreemptive(true); Credentials defaultcreds = new UsernamePasswordCredentials(getBasicAuthenticationUserName(), getBasicAuthenticationPassword()); client.getState().setCredentials(new AuthScope(getHostName(), getPort(), AuthScope.ANY_REALM), defaultcreds); } // Execute request try { client.getHostConfiguration().setHost(getHostName(), getPort(), protocol); method = new GetMethod(getContextPath()); method.setFollowRedirects(true); logger.info(methodName, "URL to get:" + getContextPath()); // Execute the GET method int statusCode = client.executeMethod(method); if (statusCode != -1) { cookies = client.getState().getCookies(); StringBuffer sb = new StringBuffer(); for (int j = 0; j < cookies.length; j++) { cookiesMap.put(cookies[j].getName(), cookies[j].getValue()); sb.append("CookieName=" + cookies[j].getName() + lineSeparator); sb.append("Value=" + cookies[j].getValue() + lineSeparator); sb.append("Domain=" + cookies[j].getDomain() + lineSeparator); } sb.append("Status Text>>>" + HttpStatus.getStatusText(statusCode)); logger.debug("Cookies are: {}" + sb.toString()); method.releaseConnection(); } } catch (Exception e) { logger.error("Error while getting LTPA token using HttpBasicAuthentication for URL {}" +e); throw new RuntimeException("Error while getting LTPA token using HttpBasicAuthentication for URL:" + contextPath, e); } finally { // Release current connection to the connection pool once you // are done method.releaseConnection(); } return cookiesMap; }
I could acheive this by using HttpBasicAuthentication. Here is the code snippet -
public class TokenHelper { private static Logger logger = LoggerFactory.getLogger(TokenHelper.class); private static final int HTTP_TIMEOUT_MILISEC = 100000; private static String lineSeparator = System.getProperty("line.separator"); @Value("#{'${hostname}'}") private String hostName; @Value("#{'${port}'}") private int port; @Value("#{'${contextpath}'}") private String contextPath; @Value("#{'${isbasicauthentication}'}") private boolean isBasicAuthentication; @Value("#{'${username}'}") private String basicAuthenticationUserName; @Value("#{'${userpassword}'}") private String basicAuthenticationPassword; public Map<String, String> getLtpaToken() throws Exception { Cookie[] cookies = null; Protocol protocol = null; Map<String, String> cookiesMap = new HashMap<String, String>(); GetMethod method = new GetMethod(); HttpClient client = new HttpClient(); method.getParams().setSoTimeout(HTTP_TIMEOUT_MILISEC); protocol = new Protocol("http", new DefaultProtocolSocketFactory(), getPort()); if (isBasicAuthentication) { client.getParams().setAuthenticationPreemptive(true); Credentials defaultcreds = new UsernamePasswordCredentials(getBasicAuthenticationUserName(), getBasicAuthenticationPassword()); client.getState().setCredentials(new AuthScope(getHostName(), getPort(), AuthScope.ANY_REALM), defaultcreds); } // Execute request try { client.getHostConfiguration().setHost(getHostName(), getPort(), protocol); method = new GetMethod(getContextPath()); method.setFollowRedirects(true); logger.info(methodName, "URL to get:" + getContextPath()); // Execute the GET method int statusCode = client.executeMethod(method); if (statusCode != -1) { cookies = client.getState().getCookies(); StringBuffer sb = new StringBuffer(); for (int j = 0; j < cookies.length; j++) { cookiesMap.put(cookies[j].getName(), cookies[j].getValue()); sb.append("CookieName=" + cookies[j].getName() + lineSeparator); sb.append("Value=" + cookies[j].getValue() + lineSeparator); sb.append("Domain=" + cookies[j].getDomain() + lineSeparator); } sb.append("Status Text>>>" + HttpStatus.getStatusText(statusCode)); logger.debug("Cookies are: {}" + sb.toString()); method.releaseConnection(); } } catch (Exception e) { logger.error("Error while getting LTPA token using HttpBasicAuthentication for URL {}" +e); throw new RuntimeException("Error while getting LTPA token using HttpBasicAuthentication for URL:" + contextPath, e); } finally { // Release current connection to the connection pool once you // are done method.releaseConnection(); } return cookiesMap; }
相关问答
更多-
如何为WebSphere Liberty Profile生成LTPA令牌(How to generate LTPA token for WebSphere Liberty Profile)[2022-05-05]
Liberty自动生成LTPA密钥并存储到${server.output.dir}/resources/security/ltpa.keys 。 在此处查看更多详细信息 - 在Liberty中配置LTPA 。 因此,如果您想生成自己的密码,只需在server.xml中配置自己的密码,如下所示:它将使用您的密码生成密钥 ... -
正如Georgy所提到的,cookie在WAS设置为HTTPOnly ,可以在Security设置下禁用。 As Georgy mentioned, the cookie was set to HTTPOnly in WAS, which could be disabled under the Security settings.
-
LTPA2令牌名称不会更改(LTPA2 token name won't change)[2022-04-14]
从v8开始肯定是可能的。 我已经在8.5.5.1上测试过它并且工作正常(我可以将ltpa cookie设置为任何名称)。 验证您的设置直接访问WAS,例如 - 在管理控制台中,而不是通过TAM。 您的问题可能与WebSEAL和Tai有关。 我不太清楚你的意思是, 出于兼容性原因 ,ltpatoken2是不可接受的 ? 它总是那样,所以改变它将宁愿引入不兼容性,而不是保持默认值。 It is definitely possible since v8. I've tested it on 8.5.5.1 and ... -
如果你关闭websphere,它基本上意味着你关闭了运行JVM的进程,这样每个运行在其中的线程都将停止。 If you shutdown websphere it basically means you shutdown the process that runs JVM so every thread running in it will be stopped.
-
在Websphere Application Server中添加外部上下文(Adding External Context in Websphere Application Server)[2021-06-15]
扩展文档根目录可能就是你想要的(我假设你想从那里提供html / jsp页面)。 您将必须使用以下条目和其他一些属性创建ibm-web.ext.xml文件:有关详细信息,请检查JavaServer ... -
通过在WebSphere Application Server中创建工作管理器,可以将任务提交到具有J2EE上下文的新线程。 对于WAS 8及更高版本,完整配置文件中提供的WorkManager现在也是ExecutorService。 这个步骤是: 在WAS管理控制台上转到资源 - >异步Bean - >工作管理器并使用jndi名称wm / myWM创建一个新的工作管理器。 在java代码中,为工作管理器执行jndi查找。 ExecutorService execService =(ExecutorServ ...
-
我可以通过使用HttpBasicAuthentication来实现这一点。 这是代码片段 - public class TokenHelper { private static Logger logger = LoggerFactory.getLogger(TokenHelper.class); private static final int HTTP_TIMEOUT_MILISEC = 100000; private static String lineSeparator = System.getP ...
-
如何仅使用jacl / jython将LTPA cookie限制为SSL(How to limit LTPA cookies to SSL only using jacl/jython)[2023-11-29]
使用Jython: AdminTask.configureSingleSignon('-requiresSSL true') configureSingleSignon命令的其他可用选项: -enable [true|false] -domainName [String] -interoperable [true|false] -attributePropagation [true|false] 参考: AdminTask对象的SecurityConfigurationCommands命令组 。 Usi ... -
我认为Swift示例不是发送POST请求而是GET。 你试过发送它作为GET吗? I think that the Swift sample is not sending POST request but GET. Have you tried to send it as GET?
-
为Java EE Web模块定义特定于环境的信息的传统方法是在web.xml中使用
,例如: entryName java.lang.Integer 1