FORUMS

c360 Forums
 Home        Members    Calendar    Who's On

Welcome Guest ( Login | Register )
      



Sample AppExpand / Collapse
Message
Posted 10/10/2006 3:31:52 PMPost #683
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
Attached is a compressed version of my test application. I removed the .LIC file from the Licenses directory and removed the BIN directory (due to size constraints). The program comes with a licensing error. I've modified the c360Location to /, /c360, /c360sdk and /AppName. I get the same error if I install directly on the CRM server and not from my laptop as well. Any help, even in CS will be greatly appreciated. Having a drop and run sample would be the best. That way we can start modifying from the get go and get up to speed faster.

  Post Attachments 
c360sdk.zip (139 views, 346.84 KB)
Posted 10/10/2006 3:39:03 PMPost #684
 

c360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guru
I get the same error if I install directly on the CRM server and not from my laptop as well.

What is the error that you are getting?

Also, did you watch the installation video? It walks you through the installation steps and finally, the SDK includes several exercises and test pages in addition to several samples I posted here on the forum. I'm sure you can use one of them as your starting point.

Jeremie Desautels

VP, Product Marketing

c360 Solutions

Posted 10/10/2006 4:54:23 PMPost #685
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
I've watched the video and re-downloaded the SDK today thinking that maybe I didn't have the complete SDK. I've also tried running the code in CS rather than VB with my sample in CS matching the video fully.

The file structure is as following:

  • App_Code
  • App_Data
  • bin
  • Config
  • Doc
  • Exercises
  • Licenses
  • Tests
  • Toolkit

I have two keys defined in the web.config

<add key="c360Location" value="/c360sdk" />

<add key="CrmUrl" value="http://crm:5555" />

The c360Location I've tried c360sdk, c360, / and the name of the virtual directory when running directly on the CRM server.

I have also verified the paths in the c360.config stored in teh config folder.

I do know that I've got to be just missing something simple being this is a brand new install.

The error being received is: 

Server Error in '/c360sdk' Application.

The request failed with HTTP status 404: Not Found.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ComponentModel.LicenseException: The request failed with HTTP status 404: Not Found.

Source Error:

[No relevant source lines]

Source File: C:\c360sdk\Default.aspx.vb    Line: 912304

Stack Trace:

[LicenseException: The request failed with HTTP status 404: Not Found.]   c360.Toolkit.Licensing.c360LicenseProvider.ᜀ(LicenseContext A_0, Type A_1, Object A_2, Boolean A_3) +1217   c360.Toolkit.Licensing.c360LicenseProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions) +44   System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey) +297   System.ComponentModel.LicenseManager.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license) +60   System.ComponentModel.LicenseManager.Validate(Type type, Object instance) +42   c360.Toolkit.SDK.Pages.AreaPage..ctor() +47   Default2..ctor() +23   ASP.default_aspx..ctor() in C:\c360sdk\Default.aspx.vb:912304   __ASP.FastObjectFactory_app_web_jzplg5dw.Create_ASP_default_aspx() +38   System.Web.Compilation.BuildResultCompiledType.CreateInstance() +99   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +162   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +56   System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +112   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +352   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +183   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +191


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

Posted 10/10/2006 5:02:17 PMPost #686
 

c360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guru
I have two keys defined in the web.config

<add key="c360Location" value="/c360sdk" />

<add key="CrmUrl" value="http://crm:5555" />

There is one and only one key that is required in web.config: the c360Location. All other keys must be added to the file called c360.config which is located in the "Config" folder.

Secondly, the "HTTP 404" error is caused by the fact that our SDK is unable to connect to the Mcirosoft CRM webservices. You need to indicate where these services are published by adding the WebServices key in your c360.config file. This is discussed here: http://www.c360.com/Support/Default.aspx?tabId=23a72820577a443aac45d2bbbe95e706&linkId=a2bea9bdde4f41cc83e06cfbaa4bbb27&Number=KBA-01126&operation=KBDETAILS

Let me know if this helps.

Jeremie Desautels

VP, Product Marketing

c360 Solutions

Posted 10/10/2006 9:50:03 PMPost #687
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
Okay, after several hours I think I've made some headway. I've transferred everything onto the CRM server. I have a virtual website on port 81. I have the following in the web.config "<add key="c360Location" value="/SroBoTime" />". SroBoTime is the name of my virtual directory. I removed the CrmUrl from the c360.config as it's on the server. I've verified the CRM and RS URL's and they're correct. I'm getting the two errors in my Application event log which I hope will tell you everything along with the problem. Directory security is the same as CRM (Integration Windows Authentication) and Anonymous is turned off.

Event Type: Warning
Event Source: c360
Event Category: None
Event ID: 0
Date:  10/10/2006
Time:  9:44:00 PM
User:  N/A
Computer: PINNACLECRM2
Description:
******[ BEGIN LOG RECORD ]*******

            Message: Licensing.GetLicense
          Log Level: 900: WARNING
          Timestamp: 10/10/2006 9:44:00 PM

       Source Class: c360.Toolkit.Licensing.c360LicenseProvider
      Source Method: ᜀ
    Source Assembly: c360.Toolkit, Version=3.0.6.175, Culture=neutral, PublicKeyToken=null
               Code:

******[ EXCEPTION ]*******

Exception: c360.Toolkit.Common.FactoryException: Unable to create the specified component. Verify the entry for [SecurityPrincipal]. ---> c360.Toolkit.Common.FactoryException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: c360 products require that currently authenticated user is impersonated.
   at c360.Toolkit.Security.CRMSecurityPrincipal..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at c360.Toolkit.Common.Factory.ᜀ(Type A_0, Object[] A_1)
   --- End of inner exception stack trace ---
   at c360.Toolkit.Common.Factory.ᜀ(Type A_0, Object[] A_1)
   at c360.Toolkit.Common.ComponentFactory.ᜀ(String A_0, Object[] A_1)
   --- End of inner exception stack trace ---
   at c360.Toolkit.Common.ComponentFactory.ᜀ(String A_0, Object[] A_1)
   at c360.Toolkit.Common.ComponentFactory.Create(String componentKey)
   at c360.Toolkit.Security.SecurityProvider.ᜀ()
   at c360.Toolkit.Security.ImpersonationStrategy.ᜀ()
   at c360.Toolkit.Security.ImpersonationStrategy.ᜁ()
   at c360.Toolkit.Licensing.c360LicenseProvider.GetOrganization()
   at c360.Toolkit.Licensing.c360LicenseProvider.get_Organization()
   at c360.Toolkit.Licensing.c360LicenseProvider.ᜀ(LicenseContext A_0, Type A_1, Object A_2, Boolean A_3)

******[ EXCEPTION ]*******

Exception: c360.Toolkit.Common.FactoryException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: c360 products require that currently authenticated user is impersonated.
   at c360.Toolkit.Security.CRMSecurityPrincipal..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at c360.Toolkit.Common.Factory.ᜀ(Type A_0, Object[] A_1)
   --- End of inner exception stack trace ---
   at c360.Toolkit.Common.Factory.ᜀ(Type A_0, Object[] A_1)
   at c360.Toolkit.Common.ComponentFactory.ᜀ(String A_0, Object[] A_1)

******[ EXCEPTION ]*******

Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: c360 products require that currently authenticated user is impersonated.
   at c360.Toolkit.Security.CRMSecurityPrincipal..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at c360.Toolkit.Common.Factory.ᜀ(Type A_0, Object[] A_1)

******[ EXCEPTION ]*******

Exception: System.InvalidOperationException: c360 products require that currently authenticated user is impersonated.
   at c360.Toolkit.Security.CRMSecurityPrincipal..ctor()

******[ CONTEXT DATA ]*******

   Application Name: c360 Toolkit
     Application ID:
            User ID:
     Transaction Id:
           Sequence: 1
       Host IP/Name: pinnaclecrm2
      Instance Name: /LM/W3SVC/1664444132/Root/SroBoTime-2-128050046391169652
         Process ID: 2112
       Process Name: c:\windows\system32\inetsrv\w3wp.exe
   Win 32 Thread ID: 4400
          Thread ID: 4400
Thread Authentication type: Negotiate
    Thread Identity: SROBO\jmarx
Process Authentication type: Negotiate
  Process Identity: NT AUTHORITY\NETWORK SERVICE
  Screen Resolution: 1280x1024
  Web User Identity: SROBO\jmarx
   Is Authenticated: True
Server Machine Name: PINNACLECRM2
  Request Timestamp: 10/10/2006 9:43:59 PM
        HTTP Method: GET
                URL: /SroBoTime/Default.aspx
      User Hostname: 127.0.0.1
  Secure Connection: False

*********** HTTP Headers *************

  Connection: Keep-Alive
  Accept: */*
  Accept-Encoding: gzip, deflate
  Accept-Language: en-us
  Host: localhost:81
  User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
  UA-CPU: x86

**************************************

   Application Path: /SroBoTime
            Browser: System.Web.Mobile.MobileCapabilities
   Content Encoding: utf-8
     Content Length: 0
       Content Type:
Execution File Path: /SroBoTime/Default.aspx

*********** HTTP Form Data *************


***********************************

*****[ END LOG RECORD ]*****


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


---

Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date:  10/10/2006
Time:  9:44:00 PM
User:  N/A
Computer: PINNACLECRM2
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 10/10/2006 9:44:00 PM
Event time (UTC): 10/11/2006 1:44:00 AM
Event ID: 16918940a8bd4ff6b0f6b7f87a5cb041
Event sequence: 4
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1664444132/Root/SroBoTime-2-128050046391169652
    Trust level: Full
    Application Virtual Path: /SroBoTime
    Application Path: C:\Websites\SroBoTime\
    Machine name: PINNACLECRM2
 
Process information:
    Process ID: 2112
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE
 
Exception information:
    Exception type: LicenseException
    Exception message: Unable to create the specified component. Verify the entry for [SecurityPrincipal].
 
Request information:
    Request URL: http://localhost:81/SroBoTime/Default.aspx
    Request path: /SroBoTime/Default.aspx
    User host address: 127.0.0.1
    User: SROBO\jmarx
    Is authenticated: True
    Authentication Type: Negotiate
    Thread account name: NT AUTHORITY\NETWORK SERVICE
 
Thread information:
    Thread ID: 1
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False
    Stack trace:    at c360.Toolkit.Licensing.c360LicenseProvider.ᜀ(LicenseContext A_0, Type A_1, Object A_2, Boolean A_3)
   at c360.Toolkit.Licensing.c360LicenseProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
   at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
   at System.ComponentModel.LicenseManager.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license)
   at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)
   at c360.Toolkit.SDK.Pages.AreaPage..ctor()
   at _Default..ctor()
   at ASP.default_aspx..ctor() in C:\Websites\SroBoTime\Default.aspx.vb:line 912304
   at __ASP.FastObjectFactory_app_web_rx5xlkhk.Create_ASP_default_aspx()
   at System.Web.Compilation.BuildResultCompiledType.CreateInstance()
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
   at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 
 
Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Posted 10/11/2006 1:18:56 PMPost #690
 

c360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guru
c360 products require that currently authenticated user is impersonated

This message means that windows integrated authentication is not enabled or that anonymnous connections are authorized and therefore our SDK is unable to determine the identity of the current user.

I know you said that you have already checked these settings but please double the following:

  1. In the IIS admin console, make sure that the "Allow anonymous connection" in the security properties of your virtual directory is unchecked.
  2. In your web.config, make sure that the authentication method is set to windows: <authentication mode="Windows"/>
  3. In your web.config, make sure that impersonnation is enabled: <identity impersonate="true"/>

The combination of these three settings will make sure that the credentials of the current user will be forwarded by the browser to IIS and threfore will be available to our SDK.

Please note that this will not work when you are developing on one machine and CRM is on another machine. In this situation, the credentatials are not forwarded and therefore our SDK doesn't have any credentials to reuse when making web service calls to CRM. You need to configure our SDK to use a username, password and domain. These three settings are explained in the "Post-Installation configuration" section in the training guide.

Jeremie Desautels

VP, Product Marketing

c360 Solutions

« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Jeremie Desautels, john.gravely, kanika.jackson, Arvind Raman, Ken Champion

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 5:11pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.406. 10 queries. Compression Enabled.