Adding a DLL to a SharePoint 2010 Application Page project - google-maps

I am trying to create an application page in SharePoint 2010. I am trying to use the GoogleMap Control on the page. In a traditional ASP.NET application you would just plop that .dll into the bin directory of the web application project. But in SharePoint, this doesn't work.
Now after googling for hours, I have found many references to creating your own user control (.ascx) and including that in your project. But this is a different case. I keep getting an error: "Could not load file or assembly 'Artem.GoogleMap, Version=4.1.0.0, Culture=neutral, PublicKeyToken=fc8d6190a3aeb01c' or one of its dependencies. The system cannot find the file specified.". I have the .dll installed in the GAC. So I should be able to find it.
Anyone have an experience with this?

Related

Azure HTML Web Site (Not ASP) Could not load file or assembly System.Web.Mvc

I have a non-asp, not asp, not .NET, not ASP.NET website (Web Site, not Web Application). I am indeed using a Visual Studio Solution, but it is empty and I have added an "Existing Website". There are no DLL's or anything involved. The only purpose of the Solution is so it can load in Visual Studio and be Source Controlled in certain manners.
When I deployed the site to Azure, using Deployment Options, I received the error:
Could not load file or assembly 'System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Again, This is not MVC. This is a regular HTML Website.
Somebody had accidentally sync'd the wrong repository to Azure previously, an ASP.NET Website. In that case, the slot believes the site is an ASP.NET Site no matter what, and tries to build it as such. So what I had to do is open up the console in Azure, cd to the "site" directory, and I did rmdir for the four folders there... wwwroot, deployments, repository... and some other one. Azure automagically re-added wwwroot and deployments. I disconnected the deployment source and re-added the correct one. After that, it didn't try to build it like a .NET Application.

SSIS file path changing to C:\windows\system32 depending on how I open the project file

I've been working with SSIS reading different files - from CSVs to XLSXs - with no problems. My paths are relative, so SSIS searches for the files from the project's folder.
Well, today my colleague tried to run a package and he got a curious error message saying that the file could not be found under the "C:\windows\system32" folder. There's no configuration that would point SSIS to that folder and with me and a third colleague it's working well.
After some investigation we discovered that the problem has nothing to do with the user itself, but with how the user opens the project. Since the beginning I've been opening the project by double clicking the ".dtproj" file. My colleague first opens the SSIS development interface then opens the project file from the menu.
Has anyone noticed that behavior? What could be the cause for that?
error message print
Microsoft Visual Studio 2008
Version 9.0.30729.4462 QFE
Microsoft .NET Framework
Version 3.5 SP1
Installed Edition: IDE Standard
This happens because the different ways of launching the IDE end up with different current directories for the IDE process. You can test this by creating a package with only a Script Task, with the one line:
MessageBox.Show(Environment.CurrentDirectory);
And then running this project after launching it both ways.
Double-clicking the project or solution file sets the folder containing that file as the current directory. (I assume this is standard Windows process launching behaviour when starting a process based on the file extension association.) SSIS packages then look in the current directory when the path to the configuration file is relative.
We use relative paths to configuration files all the time to simplify deployment, and have to always remember to open the solutions by double-clicking the SLN file.

Why is IIS Express returning HTTP 500 errors loading javascript and CSS?

I am trying to develop an ASP.NET MVC5 solution using IIS Express for local debugging. Frequently, Chrome will report HTTP500 errors trying to load certain JS and CSS files (some using the built in bundling and minification feature of MVC, some on their own).
WTH is going on with this and how do I stop it?
Thanks,
Matthew
Turns out this was related to ninject object lifecycles and my EF db context being open twice at the same time. Totally unrelated to IIS.
What helped worked is as follows. I am using Visual Studio 2015.
Close the visual studio solution. In fact I closed the visual studio itself
In the solution folder(the folder which contains the .sln file along with the project folders), you should find a .vs folder. I had deleted that folder.
Restarted the visual studio and loaded the solution.
Things are working fine now.
The reason I guess is, the config folder inside of .vs folder has the applicationhost.config file. That is having some setting issues.
In my case, I got to remove the attribute of debug="true" in web.config compilation node.
From
<compilation debug="true" targetFramework="4.7.2" />
To
<compilation targetFramework="4.7.2" />
Then it works fine.
Old thread but still relevant in VS 2019 and the top result.
For me, I created a .NET CORE WebApp (an API), then deleted it, deleted the files it left behind and recreated a .NET Framework (API) of the same name.
Started it up and spotted it was still using the same port number
https://localhost:44379
but the basic formatting was gone and 500 errors on all the .css and .js files. After editing the .csproj file and changing
<IISUrl>https://localhost:44379/</IISUrl>
to
<IISUrl>https://localhost:44380/</IISUrl>
Changing this reset something IIS Express and the css and .js files loaded and it looked fine.

Could not load file or assembly 'Venetasoft.WP.Net.SMTP, Version=1.2.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies

I used mailmessage service for sending mails with attachments in windows phone 8 app.
For this i need dll Venetasoft.WP.Net.SMTP.
So i added reference to that.
It is working fine when we run project in debug mode.
getting following exception when i xap it.
Could not load file or assembly 'Venetasoft.WP.Net.SMTP, Version=1.2.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified
Why i am getting that exception?
Please help me.
Reply as soon as possible.
Expand your project References item, find Venetasoft.WP.Net.SMTP, right click the item, and choose Properties (this may already be displayed on the lower right of your IDE). Ensure that Copy Local is set to True, otherwise the library will not be packaged with your XAP.
With version 1.3.1 the error is gone for me. Remember that with the new version there are some changes in the API.

Report View - Could not load file or assembly

I use VS2008 to develop a web application.
When I open a local report, it's report datasource does not show.
I click the report->DataSource to see it's datasource, but it appear an
error message:
Could not load file or assembly ###
But the file or assembly does exist.
How can I solve this problem?
I searched everywhere and didnt found a solution for this.
Thanks.
Copy the assembly to the folder
C:\Program Files\Microsoft Visual Studio 9.0\ReportViewer.
I use SysInternals Process Monitor to find where VS was looking for the containing file.
The assembly may exist but in a place not seen by the app. Use filemon / procmon to find out where your app is trying to load the assembly from and you will have a clue of what's going on. Also make sure the assembly version matches as well.