Exchange Web Services from SharePoint 2007.. which DLL? - deployment

MOSS 2007 is .net 2.0.. I found this DLL Microsoft.Exchange.WebServices.dll and moved it to my bin and added this to web.config
SafeControl Assembly="Microsoft.Exchange.WebServices, Version=14.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="Microsoft.Exchange.WebServices" TypeName="*" Safe="True"
But can't seem to introduce it into SharePoint 2007 without get this error:
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.Runtime.InteropServices.COMException: Cannot complete this action.

Instead of that DLL, use the EWS Managed API. It's far simpler to use than native web services.
EWS Managed API - Download: http://www.microsoft.com/download/en/details.aspx?id=13480
EWS Managed API - SDK: http://msdn.microsoft.com/en-us/library/dd633710(v=exchg.80).aspx

Related

CRM Trace Logs Showing an Exception

We are debugging a campaign plugin in CRM. We are relying on using the D365 Plugin Trace Log since the the Plugin Profiler is also throwing an error.
We are getting an exception that the Sandbox.Helper DLL is not found.
We have confirmed from the BIN that that DLL is available. We also have tried setting the mode of the plugin to None and Isolated. We have restarted the sandbox asynch service,crmapppool, and the other D365 services in the CRM server.
Check if your plugin assembly has references to other assemblies except those of the .NET Framework and the Microsoft.Xrm.Sdk dll's.
Referenced assemblies can only be used when you merge them into the plugin assembly, e.g. using ILMerge or ILRepack.

How to deploy an Orchard CMS web project to a Windows Azure Cloud Service?

Basically, I want to be able to deploy a Orchard CMS web application to a windows azure cloud service. I v'e tried following the same steps as I would normally do for any other web application but it just never works.
UPDATE
I downloaded the Orchard.Source.1.5.1 from orchardproject.net website. Added my custom modules and themes. Published the web application to a local folder. That would result in a Orchard web application. I open this web application, add the Windows Azure Cloud Service project and my web application is the web role in this project. I set up DataConnectionString to my azure cloud storage with my name and key. Published to Azure.
Once the deployment is over when I go to the site url to see the result I get this the YSOD with the following exception:
Server Error in '/' Application.
None of the constructors found with 'Public binding flags' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func1[Autofac.Features.OwnedInstances.Owned1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable1[Orchard.Mvc.Routes.IRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator)'.
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: Autofac.Core.DependencyResolutionException: None of the constructors found with 'Public binding flags' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func1[Autofac.Features.OwnedInstances.Owned1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable1[Orchard.Mvc.Routes.IRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator)'.
UPDATE:
I followed the guide in the orchard project website "Deploying Orchard to Windows Azure" and didn't touch anything, just got all the source code from the repository, ran ClickToBuildAzure from the Visual Studio 2010 command line, didn't get any error messages, set up my storage in the ServiceConfiguration file and uploaded my package and ServiceConfiguration files. Deployment went ok. I got to the Orchard Get Started screen but after input all the information, including a connection string to my SQL Azure DB (got the connection string from Azure Portal and inserted my password), I got the following error:
Setup failed: An exception was thrown while invoking the constructor 'Void .ctor(Orchard.Environment.Configuration.ShellSettings, Orchard.Data.ISessionLocator, System.Collections.Generic.IEnumerable`1[Orchard.Data.Migration.Interpreters.ICommandInterpreter], Orchard.Data.ISessionFactoryHolder, Orchard.Reports.Services.IReportsCoordinator)' on type 'DefaultDataMigrationInterpreter'.
I didn't even get to the AddingaModuletotheDistribution point.
The guide provided by the Orchard Team is not the ideal solution for me.
I have developed custom modules and themes and I work in a development environment with Visual Studio and TFS and would not like to use it with WebMatrix and and deploy to Azure Web site.
I downloaded the source code from the orchard website and added an azure web role project.
By the way, I've checked this question and this blog post and still could not resolve my problem.
Everything I find regarding this is fairly outdated!
I am almost giving up. Could anybody tell me if this is possible? Or the only way to work with Orchard is WebMatrix?
You need to read the documentation more carefully, as adding modules and themes is covered here: http://docs.orchardproject.net/Documentation/Deploying-Orchard-to-Windows-Azure#AddingaModuletotheDistribution
You need to add your modules and themes to the Azure solution, not the Orchard solution the is in src. Once you've done that, the ClickToBuildAzure script will generate a package that contains your modules and themes, and that will deploy well to Azure.
You could try http://docs.orchardproject.net/Documentation/Building-and-deploying-Orchard-from-a-source-code-drop This solved the exact same exception for me just now, but I built with the intent to run on IIS rather than Azure.
Didn't investigate to figure out what the steps in the link did to satisfy the IoC container that was not satisfied by doing a regular file system publish.

weborb and wcf service library with ado .net entity framework

i've created a wcf service library with ado .net entity framework to handle the retrieving of data from the database and send it to the user.
i've been testing it in visual studio without any problems.
so, i moved the dll of the service and the xml configuration file to the bin folder of weborb, changed the web.config to add my service.
but when i invoke the service from the webconsole i get this error:
>The server was unable to process the request due to an internal
>error. For more information about the error, either turn on
>IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute
>or from the <serviceDebug> configuration behavior) on the server in
>order to send the exception information back to the client, or turn on
>tracing as per the Microsoft .NET Framework 3.0 SDK documentation and
>inspect the server trace logs"
can anyone give any help with this?
how can i get a working wcf service library using ado .net entity framework in weborb?
help would be appreciated.
thanks in advance.
Have you checked the WebORB log?
Then start off by trying the WebORB examples from here.
The WebORB log should give you more detail about the error. With that info, I would post a question on the WebORB forum.

Azure error when using EF agains SQL Server CE 4.0 database

I have an ASP.NET MVC 3 application which I want to deploy to Azure. The application uses EF against a SQL Server CE 4.0 database in the App_Data directory.
The site runs fine locally but when I reference it from an ASP.NET MVC 3 web role and publish it to Azure I get this error:
"Unable to find the requested .Net Framework Data Provider. It may not be installed."
The full exception can be viewed here: http://52df5a4a5c1b4d10a927078bb8a06d15.cloudapp.net/drug
Here is connection string from the web.config file:
<add name="DbEntities" connectionString="metadata=res://*/AMDBModeledmx.csdl|res://*/AMDBModeledmx.ssdl|res://*/AMDBModeledmx.msl;provider=System.Data.SqlServerCe.4.0;provider connection string="Data Source=|DataDirectory|\AMDB.sdf"" providerName="System.Data.EntityClient" />
I have tried compiling my project to target x86 and setting the "Copy Local" property of the System.Data.Entity reference to true. Nothing helps.
Is it possible to run a web app in Azure and use a file-based database? I understand this can be a problem with multiple instances, but I'm only using a single VM.
I can't see your error page, but it looks like the SQL CE Data Provider DLL is missing. Have you tried following these instructions?
http://blogs.msdn.com/b/webdevtools/archive/2011/01/06/how-to-bin-deploy-sql-compact-edition-4-0-and-razor-web-projects.aspx

ASP MVC 2 in Sharepoint 2007 Security Exception

I am trying to configure ASP MVC 2 Framework to run within a SharePoint 2007 install on IIS 6.0. I have managed to get the two web.config setups together, and made GAC and global.asax changes.
When I try to access the MVC application within the SharePoint domain (http://Sharepoint.com/MVCApp), I get a security exception.
**Source Error:**
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
**Stack Trace:**
[SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.GetReferencedAssemblies() +14
System.Web.Mvc.TypeCacheUtil.FilterTypesInAssemblies(IBuildManager buildManager, Predicate`1 predicate) +88
System.Web.Mvc.TypeCacheUtil.GetFilteredTypesFromAssemblies(String cacheName, Predicate`1 predicate, IBuildManager buildManager) +65
System.Web.Mvc.AreaRegistration.RegisterAllAreas(RouteCollection routes, IBuildManager buildManager, Object state) +80
System.Web.Mvc.AreaRegistration.RegisterAllAreas(Object state) +55
System.Web.Mvc.AreaRegistration.RegisterAllAreas() +7
CapExRequest.MvcApplication.Application_Start() in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\CapExRequest\CapExRequest\Global.asax.cs:29
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3614
I have tried adding permissions to the MachineName\ASPNET account for the \MVCApplication as suggested in one article. No joy.
Other occurences seem to be related to accessing a remote file share. There is no remote file share in my instance.
Any thoughts, suggestions, answers??
So, here is what the setup is, and the steps taken to get it all together...
Followed basic instructions for
running an ASP.NET MVC application in SharePoint (see link below), but I put the
custom MVCHttpApplication in it's own
project and created a standalone
assembly;
Updated SharePoint to include AJAX
3.5 (ours was only referencing 1.0 standalone);
Built a signed application and
deployed to the virtual directory,
including adding the application
assembly in the GAC.
Actually pretty straight-forward so far. It just took a while to come to my senses.
"Using ASP>NET with Sharepoint Publishing" http://vspug.com/mbailey/files/2010/04/Using-ASP.NET-MVC-2-with-Sharepoint-Publishing.pdf