ajax control toolkit & sharepoint 2010 - sharepoint-2010

I was trying to use ajax control toolkit in sharepoint 2010, but i get some errors. I found that the last release of the toolkit doesn't work with SP2010, so i downloaded the version 30930 found at http://ajaxcontroltoolkit.codeplex.com/releases/view/33804
Then i modified the web.config adding this:
<assemblies>
....
<add assembly="AjaxControlToolkit, Version=3.0.30930.28736, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e" />
I added the dll to the references (creating a new tab in the toolbox and browsing the dll file) and started using the ajax controls in my web part. It deploys without problems, but when i run my webpage i get this error:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load file or assembly 'AjaxControlToolkit, Version=3.5.40412.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Which points to the first line of my webpart ascx file
Any ideas?

It looks like your web part references version 3.5.40412.0 of the AJAX Control Toolkit in an #Register directive. Since you want to use version 3.0.30930.28736, and since that version is properly referenced in your web.config, you should register the toolkit in your web part using its assembly name and namespace only, e.g.:
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="ajax" %>

Take a look at this blog article which explains how to use the Ajax Control Toolkit with SharePoint 2010 http://www.inspiredbytechnology.com/index.php/2010/10/28/using-the-ajax-control-toolkit-with-sharepoint-2010/

Related

ASP.NET Core configurations issue with rc1 vs rc2 and more

I am using the DotNetCore.1.0.0-VS2015Tools.Preview2.exe with Visual Studio Update 3.
I am unable to migrate code to read settings in the appsettings.json file from an MVC6 app.
The code uses the #inject Microsoft.Extensions.OptionsModel.IOptions Settings syntax in a razor file to read the configuration.
The only version of Microsoft.Extensions.OptionsModel.IOptions available is rc1, whereas the Microsoft.Extensions.Options.ConfigurationExtensions version is rc2.
Therefore I am getting the 'ambiguous call' error referred to in a related .net github issue:
Error CS0121 The call is ambiguous between the following methods or properties:
Microsoft.Extensions.DependencyInjection.OptionsServiceCollectionExtensions.Configure and Microsoft.Extensions.DependencyInjection.OptionsConfigurationServiceCollectionExtensions.Configure. This error is about using ANY rc1 version concurrently with any rc2 version of any library/component listed in project.json.
leaving out the Microsoft.Extensions.OptionsModel.Options part I get this further error:
Could not load type 'Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions' from assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
Of course, I realize this is part of the worst (or most visible) release mess in ms-land history. And such is the cost of progress. But I still would like to know the answer, please.

Issue with GlobalExceptionHandler Sharepoint 2010

I have a fatal error which I do not know how to solve,even after several days of trying.
The error that i have is :
"Could not load file or assembly 'GlobalExceptionHandler, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ed6585c9914bae60' or one of its dependencies. The system cannot find the file specified."
For more details:
-I had never before seen this error but when I deployed a project I encountered the error cited above...
-So ,after this change, I assume that the action mentioned before caused me this error.
-For this, I executed orders at "Windows PowerShell" as: stsadm-o-name deletesolution solutionName.wsp to remove the solution completely.
-After that, I made sure that the project I deployed ​​is no longer in my server.
-Later, when I logged to the" Sharepoint Central Administration" on port 24427. ,in hoping not to see the error anymore ,i saw that the error has not disappeared .
So , now i no longer have access to the " Sharepoint Central Administration",as the error remains.
I will be grateful to any proposal from you.
Thank you & sorry for my english. .
Please try out below few steps:-
1.Deploy the assembly to GAC or copy the dll to the bin folder of your web application
2.Add the assembly info in your web.config assemblies section and in the safe controls section.
3.Redeploy the solution.
This should help.

I cannot add service reference(WCF library) to MVC4 in VS2012

My problem is very simple, but unfortunately I cannot figure out what's wrong. I've created a new MVC4 Internet Application project with Razor syntax, then I added another WCF Library project to this solution. I did not make any change on these codes. However, as I added the WCF project as a service reference in the MVC 4 app, I'm getting 1 Error message and 3 Warning messages:
Error 4 Custom tool error: Failed to generate code for the service
reference 'ServiceReference1'. Please check other error and warning
messages for details. c:\users\vendre\documents\visual studio
2012\Projects\MvcApplication3\MvcApplication3\Service
References\ServiceReference1\Reference.svcmap 1 1 MvcApplication3
Warning 1 Custom tool warning: Cannot import wsdl:portType Detail:
An exception was thrown while running a WSDL import extension:
System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Could not load file or assembly 'DotNetOpenAuth.AspNet,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=2780ccd10d57b246'
or one of its dependencies. The system cannot find the file
specified.
Warning 2 Custom tool warning: Cannot import wsdl:binding Detail:
There was an error importing a wsdl:portType that the wsdl:binding
is dependent on. XPath to wsdl:portType:
//wsdl:definitions[#targetNamespace='http://tempuri.org/']/wsdl:portType[#name='IService1']
Warning 3 Custom tool warning: Cannot import wsdl:port Detail: There
was an error importing a wsdl:binding that the wsdl:port is
dependent on. XPath to wsdl:binding:
//wsdl:definitions[#targetNamespace='http://tempuri.org/']/wsdl:binding[#name='BasicHttpBinding_IService1']
I read some article but did not resolved my problem. If somebody know the answer for my problem, please tell me.
THX.
When you add the reference, on advanced setting remove the reuse types checkbox.
If you're experiencing this problem in 2021 with VS2019. Add a folder to the project called "Connected Services"
sometimes you need to create a folder "Service References" in project path. If you dont have this folder it should gives this path error.
If using VS 2019, check if in Solution Explorer you see "Service Reference". Than edit the project file for following
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
In Visual Studio 2019, I fixed the error (system cannot find path specified) by creating a new folder named "Connected Services" inside project folder
In Visual Studio 2022, You need to create a folder "Connected Services" in project path, via Windows Explorer, not Visual studio solution explorer'
You can try the following :
Delete the "Connected Services" folder from the project in Visual Studio
Add the service reference with right-click on the project / Add / Service Reference...
It should work and recreate the "Connected Services" folder with your new service reference.

WCF: Could not load file or assembly ... the system cannot find the file specified

I've got a WCF Service hosted in IIS 6/7. I tried different things with the .svc file, but I can't get it to work. I always get a FileNotFoundException "Could not load file or assembly 'X.Y.Z' or one of its depencies. The system cannot find the file specified."
The assembly is in the bin folder, not in the GAC. But X.Y.Z is the namespace and classname, so the server is looking for the wrong assembly filename. The Assembly Load Trace confirms, that it's looking for an X.Y.Z.DLL in various places, but that namespace and classname ... X.Y.DLL would be the assembly.
I tried the svc, Visual Studio 2010 generated and I modified it to contain only the fully qualified name
<%# ServiceHost Service="X.Y.Z, X.Y, Version=1.0.2.0, Culture=neutral, PublicKeyToken=xxxxx" %>
Use the assembly bind log viewer to see the locations that the clr is looking at for the requested assembly - http://msdn.microsoft.com/en-us/library/e74a18c4(v=VS.100).aspx
The error msg might be misleading. Try to create a test page in the same project and create an instance of the service class from the type name. When you navigate to this test page, it should give the right error message about what assemblies it's not able to find. You can use the following code, e.g.
Type serviceType = Type.GetType("X.Y.Z, X.Y, Version=1.0.2.0, Culture=neutral, PublicKeyToken=xxxxx");
var serviceInstance = Activator.CreateInstance(serviceType);
Response.Write(serviceInstance);
Does this WCF has any third party libraries referring, which demand Applicatin Pool to be either 32-bit version or 64-bit version? Verify AppPool set to classic, integrated as appropriately

error RG0000: Could not load file or assembly 'xxx' or one of its dependencies. Access is denied

This is for a windows forms project under VS2010.
Here is the message I get from MSBuild:
error RG0000: Could not load file or
assembly
'3rdPartyAssemblyUsedByProject,
Version=1.1.263.0, Culture=neutral,
PublicKeyToken=687bce93d7ce902c' or
one of its dependencies. Access is
denied. Line 174 , position 5.
[C:\xxx\src\BackOffice.csproj]
Here is the command line used to kick this off:
c:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/msbuild.exe BackOffice.csproj /p:PlatformTarget=x86
Line 174 of the resx file that was attributed to the error:
<data name="generalImages.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
...
</value>
</data>
generalImages is an ImageList control with images used for buttons on the form.
This works fine on my dev machine, but is a problem on my build server. My workstation is Windows 7 64-bit, the build server is Windows 2008 Server 64-bit. The build server does have the windows 7.1 sdk installed.
If I use msbuild from v3.5 framework, the compile completes successfully. I do get this warning message that is not causing me any problem at this point:
Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it had ToolsVersion="3.5".
The whole reason for this is to actually target the 4.0 framework and use things like method defaults, which do not work when targeting 3.5.
I have searched and searched on this one. I have come across a lot of hits related to 32-bit/64-bit issues -- where the image format is the problem, but this is not my problem. This error says "Access is denied". I did use fuslogvw to try to figure out where the access denied was coming from -- but I am not seeing that it is, but it is not actually finding any assembly. The assembly is not in the GAC, but in a tangential directory to the project file where the project file reference is.
Here is the fusion log:
* Assembly Binder Log Entry (8/30/2010 # 1:44:48 PM) *
The operation failed. Bind result: hr
= 0x80070002. The system cannot find the file specified.
Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\mscorwks.dll
Running under executable C:\Program
Files\Microsoft
SDKs\Windows\v7.1\Bin\ResGen.exe
--- A detailed error log follows.
=== Pre-bind state information === LOG: User = domain\user LOG:
DisplayName =
3rdPartyAssemblyUsedByProject,
Version=1.1.263.0, Culture=neutral,
PublicKeyToken=687bce93d7ce902c
(Fully-specified) LOG: Appbase =
file:///C:/Program Files/Microsoft
SDKs/Windows/v7.1/Bin/ LOG: Initial
PrivatePath = NULL LOG: Dynamic Base =
NULL LOG: Cache Base = NULL LOG:
AppName = NULL Calling assembly :
System.Windows.Forms, Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=b77a5c561934e089.
=== LOG: This bind starts in default load context. LOG: Using application
configuration file: C:\Program
Files\Microsoft
SDKs\Windows\v7.1\Bin\ResGen.exe.Config
LOG: Using machine configuration file
from
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config.
LOG: Post-policy reference:
3rdPartyAssemblyUsedByProject,
Version=1.1.263.0, Culture=neutral,
PublicKeyToken=687bce93d7ce902c LOG:
GAC Lookup was unsuccessful. LOG:
Attempting download of new URL
file:///C:/Program Files/Microsoft
SDKs/Windows/v7.1/Bin/3rdPartyAssemblyUsedByProject.DLL.
LOG: Attempting download of new URL
file:///C:/Program Files/Microsoft
SDKs/Windows/v7.1/Bin/3rdPartyAssemblyUsedByProject/3rdPartyAssemblyUsedByProject.DLL.
LOG: Attempting download of new URL
file:///C:/Program Files/Microsoft
SDKs/Windows/v7.1/Bin/3rdPartyAssemblyUsedByProject.EXE.
LOG: Attempting download of new URL
file:///C:/Program Files/Microsoft
SDKs/Windows/v7.1/Bin/3rdPartyAssemblyUsedByProject/3rdPartyAssemblyUsedByProject.EXE.
LOG: All probing URLs attempted and
failed.
At this point -- I am stumped. Not sure where to go next. Any advice would be welcomed.
Cort
It looks a lot like the known VS 2010 bug described here on blogs.msdn.com. If so, it seems that Microsoft have decided not to fix it until Visual Studio 11 at the earliest, and for many people (including us :| ) none of the workarounds mentioned in the post work. So good luck.
I had a similar issue with ResGen : error RG0000: Could not load referenced assembly. In my case it turned out one of the project files in the solution had not been correctly upgraded to vs2010. Once I fixed up the tool references to 4.0 it worked correctly.
Team build runs under a service account. Did you check whether this account has access to the program files location where the 3rd party assembly is located?
I faced the exact problem as described in this MSDN blog as mentioned in the answer by #Joel.Thought of posting the workaround that works for me to save others time as I just used up half a day trying for solutions.
The workaround that I used is discussed in the comment sections of that blog post which is to search for j00L and replace it with j0yL in the error occurring resx. files. The bad side of this workaround is you will need to edit the resx. file every time you make changes to the imagelist.