What version is my VS 2005 Web Site project? - web

I thought this would be simpler to verify, but I haven't been in VS 2005 for quite some time. I have a web site (not web application) project I'm trying to troubleshoot some errors in and I want to verify the .net run-time version.
The only hint I've found is in the references section of the property pages. There is a reference to System.Windows.Forms v 2.0.0.0. Is this my answer?

I believe it is, but check your Web.config file. Since a web site has no .vbproj file, Web.config is the only relevant file here. This is where VS stores the references that you see in the property pages.

Related

How to Call Custom .dll in SharePoint?

I am trying add new function inside my SharePoint and I created HTML code and it will call .dll file where I download it. However, when I run project standalone outside SharePoint it works. However, inside SharePoint code (HTML) when I add assembly to my .dll , it shows not found.
I tried adding it in SafeControl in web.config bug still same issue.
I place .dll in all places where other SharePoint .dll are there but still the same problem.
I am not sure if I understood what you trying to accomplish but I suspect you are using some SharePoint on-prem and you deploy some kind of solution (webpart or other) to a site were you want to use an external dll. If that is the case you need to create some kind of empty sharepoint farm project (or use one of the existing farm solutions) and add an external dll to it so it will be deployed to GAC. When an dll is in Global Assembly Cache then we may use it in all places in SharePoint.
Here I found some blog post how to add a external dll to GAC
I hope this will be of any help
When the project is running inside the SP server, it's different from when it's starting outside the farm. You need to ensure the dll has been copied to gac, or the server cannot find it.
If you're developing a custom WCF in SP on-premise, you may take a reference of below demo:
Custom WCF
More reference:
https://blog.mastykarz.nl/including-additional-assemblies-wsp-visual-studio-sharepoint-development-tools/
BR

Converted Web Site Project to Web Application Project - Can not access UI Controls

I have converted a large project, currently in VS 2012 from a Web Site project to a Web Application project.
I have added the namespace to all of my .cs files.
I have ran the "Convert to web application" on the project and it has generated all of the needed files. (So I do have the designer files created as part of this upgrade)
When I compile, it errors off on all of the references in my C# code behind file for all of the UI Controls. The error indicates that the control does not exist. The controls are there, and they are present in the designer files.
I have cleaned my solution and no matter what I do I get this error.
Any ideas / suggestions of things to try? Have I missed something in the conversion to a Web Application?
Fixed My Issue.. It was the inherits statement in the ASPX. I had to include the namespace along with that... Problem solved... so, the syntax is inherits="namespace.formname"

Add Application Error on Default Web Site (IIS 7.5, Windows server 2008R2)

I am trying to add a .net application to my Default Web Site on IIS 7.5 Windows Server 2008 R2. The Default Web Site currently serves ASP Classic pages (not sure if that is relevant) and I'm trying to setup some aspx pages. But I can't even add a new application, i keep getting an error of
"value does not fall within range"
I have no idea what this means?
Please see my screenshot for more information:
http://i.imgur.com/nsUs5.png
Thanks in advance.
Although quite tedious, you could try checking the settings in the apphost config file. You can find it at C:\Windows\System32\inetsrv\config
Look for errors in names, sometimes spaces can be replaced with %20% by Visual Studio which should be removed, also if you have deleted something manually in your file system, this will not have been updated in the applicationhost config file, so any references would need to be removed manually also.
Regards, and good luck
Well i never found a solution apart from Creating the App as ASP Classic (which would allow me too do it) and then switching the AppPool to DefaultAppPool which in turn lets me server ASPX pages.
So, Kind of solved for now...

Deploying custom dll's in SharePoint 2010

I'm new to SharePoint and trying to get my head around this. I have a simple Web Part project. I also have a custom Data layer project that uses the Microsoft Enterprise Library for data access. In the Web Part project, I am adding a reference to the Data layer project's assembly. I specified in the Package of the Web Part project that I want my Data layer's assembly to be deployed. I can verify this works by using standard ADO.NET classes and not the custom MS library. If I deploy to the SharePoint server (which I have 100% access to) using the Enterprise Library, I get the error message:
"Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data"
What steps do I need to take to ensure this project and all future projects on the server can easily gain access to the Enterprise Library for data access?
Thanks!
You did everything correct until a certain point: Deployment.
When deploying external DLLs, which shall also be put into the GAC or somewhere else, you need to package them with the WSP aswell. This has become very easy with Visual Studio 2010:
Open your Package
Click on "Advanced" (on the bottom)
Add your external DLL and maybe even SafeControls for the web.config

How to get a product key token from a library file programatically?

I am creating a SharePoint solution project that will install the Telerik dll files into the GAC and write the appropriate lines into the webconfig upon feature activation. My question is, is there a way to get the product key token, version, and culture info of a dll programatically. I have used the System.Reflection.Assembly.GetExecutingAssembly() before to get the embedded resources, such as a javascript file, and add it to the appropriate folder. Would this be the same way to get the dll file, and if so what would I do to get the assembly info of an embedded assembly? Thanks for any direction.
See this related question.
Out of curiosity, where in your web.config are you adding references to Telerik DLLs? I recently did a project that uses the Telerik Silverlight controls. While I had to configure the web.config to support the .Net 3.5 framework, I did not have to add anything specifically for the Telerik DLLs as their controls were all wrapped within my custom Web Parts.

Resources