The Website Is Already Referencing The Assembly?

Jul 13, 2010

I keep trying to add an assembly reference to my website which doesn't show up anywhere in my code. Specifically, I would like to add a reference to System.Xml.Linq.dll to my website. No such reference appears in my web.config file. Also, when I right click on the website in the Solution Explorer window, go to Property Pages, and then click on References in the left-hand column, System.Xml.Linq does not appear. Yet, when I right-click on the website and go to add reference, I ultimately am met with the error:

"The website is already referencing the assembly 'System.Xml.Linq'"

Also, when I put a using statement at the top of one of my classes in my App_Code folder for the System.Xml.Linq namespace, the Visual Studio IDE does not flag it as an error.Any insight into this strangeness would be very much appreciated. I'd like to put this into production someday, and I'm worried it might not work due to a missing reference. The version I'm currently using is Visual Studio 2010 Professional Edition.

View 9 Replies


Similar Messages:

Recompile The Assembly To Use The New Mono Assembly Versions The Assembly Is Closed Source?

Feb 18, 2010

I have recently discovered that I am affected by this bug http://www.mail-archive.com/mono-bugs@lists.ximian.com/msg71515.html

Well,at http://www.mail-archive.com/mono-bugs@lists.ximian.com/msg71529.html they say the work around is to create a global policy assembly and redirect the assemblies that way since it is not read from the web.config.

How do you actually do what they describe there? There is a huge documentation gap in that area with Mono.Also,I can't just recompile the assembly to use the new Mono assembly versions because the assembly is closed source.(but it does work with Mono.)

View 1 Replies

Add An Assembly To A Website?

Apr 20, 2010

I created this website and it work fine on local machine but when i upload it to remote server then it throws error that it cant find assembly....

The assembly is not in my Bin folder and i can not find it in my machine or at least don't know where to look.

Parser Error Message: Could not load file or assembly 'MySql.Data, Version=6.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.

View 3 Replies

Installation :: Strong Naming An Assembly Of A Website?

Jan 24, 2010

Strong Named Their Assembly. I've read on-line and in the help files for 6 hours straight and I am no where closer to getting this. It seems that every 6 months I run up against one of these types of things with VB.net and the .Net Framework. I read on line and find dozens of people who get the same exact error. Most of the threads are never resolved and the ones that seem to resolve the issue do it in a way that doesn't work for ever one else. It is really absurd.

My web site runs fine in debug mode on my computer (local host). It loads in FireFox and runs fine. When I post it to my web site I get the error below. I try to "Strong Name The Assembly" with the command line command "aspnet_compiler -v default.aspx X:NetProjectsHumMPI -keyfile X:NetProjectsHumMPIkeypair.snk -aptca"

Default.aspx is what fails. This should be the virtual folder of my web app. Obviously "Default.aspx" is not right. I have tried 42 variations on what I think the virtual path to my web app might be. Every single time the compiler fails telling me that it is not a valid path.

I'm moving in to week two of trying to get a simple "Hello world" web app to load on my web site. It runs perfect on my development machine but generates constant errors on the web site. Each time I fix a problem that only happens on the web site another one crops up with even the slightest change - or sometimes even NO change to the code.

View 5 Replies

Visual Studio :: How To Compil A Website That Uses An X64 Assembly

Aug 30, 2010

I am trying to compile a website in Visual Studio 2008 on a 64-bit platform. The website needs to run as a native 64-bit application, and also references an x64 assembly. Whenever I try to build the website in visual studio, I get a bad image format exception referring to the x64 assembly.As per my understanding, visual studio compilation is running as a 32 bit process causing this problem. Also, for websites the only build platform available for selection in visual studio is '.Net'. So I cannot select that the website should be built for x64 execution.

View 3 Replies

Web Forms :: Putting Dlls On Website's Assembly Folder?

Oct 30, 2010

How can I put my own dlls on the web-site in the hosting assembly folder, if I hire an hosting space on some computers on the internet.

i.e : Using Plex, for Windows 7, Framework 3.5, ASP.NET.

View 5 Replies

Visual Studio - Website Still Looking For Old Name Of Renamed Referenced Assembly?

Aug 4, 2010

I have a solution with a website and a class library. I have renamed the class library project from Insight_WebControls to Insight.WebControls. I have also renamed the assembly it produces in its properties.

I have removed from the website's references the old class library and added the new.

However, when I try to build the website, I get the error 'Could not load file or assembly 'Insight_WebControls' or one of its dependencies. The system cannot find the file specified.' There is a dll called 'Insight.WebControls' in the bin folder. Clearly some part of the website is still looking for the old filename. Can anyone tell me how to point it to Insight.WebControls.dll instead?

View 1 Replies

Parent Website .net 2.0 WebApp Which Use System.web.extensions Assembly

Jul 27, 2010

Now I have WCF web.config problem. At first, I have parent website .net 2.0 "WebApp" which use "system.web.extensions" assembly.

<configuration>
configSections>
sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
[code]...

View 3 Replies

Assemblies - Embed Js / Css Images Into Separate Assembly To Read From Website

Sep 3, 2010

I'd like to create a class library project where embed resources like js, css and maybe image files. I would compile it and copy the dll into the bin folder of my web site to include the resources into my pages with GetWebResourceUrl.

I tried with an assembly that have no .cs files, but it doesn't seem to work, I can't see the namespace of the assembly in the web project.

View 1 Replies

Security :: Can't Deploy Custom MembershipProvider / RoleProvider Assembly To Website

Oct 15, 2010

I have written an assembly (DLL) containing two classes, MyMembershipProvider and MyRoleProvider, which are derived from MembershipProvider and RoleProvider, respectively. I have implemented most but not all of the abstract methods; the remaining ones all throw a NotImplementedException. I have signed the assembly and added a reference to it in my web-site project, where the relevant web.config sections look like this:

[Code]....

When I fire up the site, however, I get the following error:

Configuration Error

Description:
An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message:
Exception has been thrown by the target of an invocation.

The error message points to the <add /> tag in the <roleManager /> section: if I take that out, however (enabled="false"), it comes back again as soon as I try to log-in to the site (this time pointing to the membership section). I have verified that is recognising the classes by changing the name in the "type" attribute (to something that doesn't exist), at which point it throws a different error. Therefore I'm presuming there's a problem with my assembly code somewhere; but how can I find out where? I have debug=true in the web.config and also compiled the assembly with Debug options, but no clues.

View 4 Replies

Website Project To Reference A Signed Assembly In Visual Studio?

Mar 30, 2011

I'm aware of the following two different types of web projects in Visual Studio 2008:Website projectWeb application projectA web application project can reference a signed assembly as long as the web application's assembly is also signed with the same key. However, this doesn't work with the website project because there is no place to sign an assembly. I think this is because the assembly is compiled dynamically on the server?

Anyway, is it possible to get the website project working with this signed assembly? Or will I have to convert this website project into a web application project?Edit:The following situation has required me to ask for clarification in this matter:I have a class library that is being referenced by several other projects in my solution in Visual Studio. One of the projects is a windows application that will be deployed to specific external users. In order to make sure that the application is using the correct assembly and to also prevent others from using the assembly (I am aware of the limitations with respect to its effectiveness), all assemblies have been signed and all the classes in the library are declared as Friend (internal).

The website project doesn't seem to have a way for me to sign its assembly and I get the following message when attempting to use anything from the library: "CLASS is not assessable in this context because it is 'Friend'", which is to be expected.The following attributes are inside the AssemblyInfo.vb file in my class library project:

<Assembly: InternalsVisibleTo("OtherProject1, PublicKey=AAA...")>
<Assembly: InternalsVisibleTo("OtherProject2, PublicKey=AAA...")>
...

My Conclusion:Looks like the cleanest way to do this would be to convert the website into a web application but this would require a bit of time to do since our site is pretty fleshed out already and as pointed out in other discussions, can be quite a pain to do. Going forward, I think creating a web application in the first place may have been a better idea and much more flexible for future development.

View 3 Replies

Visual Studio :: Assembly Editor - Create A First Blank Page For An Assembly Project?

Oct 11, 2010

i was wondering if visual studio 2010 can be used as an assembly editor too????if yes where do i have to go to create a first blank page for an assembly project?

View 1 Replies

Web Forms :: Referring An Assembly In Project / Without Adding Assembly Reference, It Still Accepting And Running Code?

Jul 5, 2010

Before using any class in your website project/page we have to add it's assembly reference to our project. Right?

Now, when I am using SmtpClient class from System.Net assembly after adding the System.Net.Mail namespace in namespace node of application's web.config file but without adding assembly reference to the project, it still accepting and running the code. Why?

I enquired the machine's web.config file located at C:WINDOWSMicrosoft.NETFrameworkv2.0.50727CONFIG but didnt find assembly reference for System.Net there also.

So bit confused how it is working and where the assembly reference has been added and how?

View 1 Replies

Assembly Generation - Reference Assembly Targets Different Processor?

May 2, 2010

I'm getting following warning

Assembly generation -- Referenced assembly 'System.Web.dll' targets a different processor

What does this mean and how do I fix this?

View 1 Replies

Visual Studio - Why Does Website Reference Assembly From GAC, When Adding Local Reference

Jan 7, 2010

When you use ASP.NET web site (instead of web application model) and add reference to an assembly from local folder, Visual Studio, it seems, understands that this local assembly is also in GAC and so does NOT copy this assembly to bin folder (as it does with non-GAC assemblies), but simply adds new record in web.config file.

Why such a behaviour? Is it possible to force copy to bin folder (I need this since .dll is not on target environment)? I can add assembly to bin folder as file and it will work, but in this case bin folder contents will be in source control, which is not good.

View 3 Replies

Getting "cannot Copy Assembly" Errors When Trying To Build Website

Feb 25, 2010

I'm getting two of these errors when trying to build the full solution for our website. Here's the full text of the errors:

Error 91 Cannot copy assembly 'Emcom.DataAccess.dll' to file 'C:workevan-moor.com-trunk2007.evan-moor.comBinEmcom.DataAccess.dll'. Unable to add 'C:workevan-moor.com-developmentEmcom.DataAccessinDebugEmcom.DataAccess.dll' to the Web site. Unable to add file 'BinEmcom.DataAccess.dll'. The process cannot access the file because it is being used by another process.
C:...2007.evan-moor.com

Error 92 Cannot copy assembly 'Emcom.DataAccess.Generated.dll' to file 'C:workevan-moor.com-trunk2007.evan-moor.comBinEmcom.DataAccess.Generated.dll'. Unable to add 'C:workevan-moor.com-developmentEmcom.DataAccessinDebugEmcom.DataAccess.Generated.dll' to the Web site. Unable to add file 'BinEmcom.DataAccess.Generated.dll'. The process cannot access the file because it is being used by another process.
C:...2007.evan-moor.com

I've done everything I can think of short of reinstalling Visual Studio to try and fix this and nothing works. One of my co-workers also gets these errors, but another one does not. I suspect one of us might have done a merge incorrectly to cause this given that it's referring to the development folder in here while I'm trying to build the solution of the trunk.

I've checked and double checked all the dlls, and the two projects referenced here and neither of them are using the development folder, which I suspected might have caused this. I also did a clean brand new checkout of our trunk, and still got these errors. Then I tried deleting all the .NET temporary files to solve it, and still no luck. I did a google search for this issue and found a Microsoft hotfix for the problem which involved replacing a dll - but that was for Visual Studio 2003, and I'm using 2008. The dll in question on my computer is two full versions newer than the replacement version they list in the hotfix, so I'm not sure it'd be a good idea to replace what I've got with what's mentioned there.

Short of reinstalling Visual Studio and reformatting my computer, I'm out of ideas. Reinstalling might do it, but reformatting would be too much work just to fix this bug.

View 2 Replies

Create Shared Assembly And Use That Assembly In Web Application?

Jun 3, 2010

I just want to create Shared Assembly and use that assembly in our application.I am using VS 2005.

Step 1

I am trying to build a dll.

Create class library project <TestDllHell>.

Under that project add CalculationArea.cs file.

[Code]....

Then TestDllHell.dll add into GAC successfully.

Now I want to use it in my Website project so did the following steps but unable to view that dll in .Net Reference List Box.

•I go for Run regedit to edit the Windows Registry.

•Navigate to the HKEY_LOCAL_MACHINESOFTWAREMicrosoft.NETFrameworkAssemblyFolders key.

•Right click on the AssemblyFolders key, then select New > Key. Enter the name of your assembly (without the .dll extension).

•Double click on the key's (Default) value. The Edit String dialog will appear. Enter the full path of the folder where your assembly resides. Note that all assemblies in that folder will appear in the Visual Studio list.

•IMPORTANT! You must exit and restart Visual Studio to see your assembly in the Add Reference dialog.

My question is that

How can I get that dll in my add reference assembly List .Net section?

And if I modify that dll(TestDllHell.dll) then again register in GAC then version will be different,So how can I told my client application that which dll you choose?

View 3 Replies

Configuration :: Referencing 3.5 Dll's In 4.0?

Jun 9, 2010

I have to create a framework 4.0 website, is it possible to reference a dll of the data layer( the data layer is an other project in framework 3.5) in my website? The main reason of this is I want to reuse the datalayer of the application which is very huge.

View 1 Replies

Referencing Variables From C#?

Feb 12, 2011

I am trying to use QueryStrings from my C# file in my ASPX file:

<asp:Button ID="LinkButtonDetails" runat="server" Text="DETAILS"
PostBackUrl='<%# string.Format("~/projectdetails.aspx?guid=<%= id%>
&name=<%= name%>
&role=<%= company_role%>
&member=<%= mem_id%>
&company={0}
&project={1}&id={2}", Eval("CompanyID"), Eval("ProjectName"), Eval("ProjectID")) %>' />

View 2 Replies

Referencing CSS And JavaScript Files Relatively?

Jun 10, 2010

I have an IIS web site. This web site contains other web sites so the structure is like this.

[code]....

The problem is that it now tries to find the file at http:serverMainWebSiteScripts....

How can I work around that? Should I put all my scripts and CSS files into the root directory, is that a preferred solution?

View 3 Replies

Why Use Url.Content For Referencing Resources

Dec 10, 2010

In almost every ASP.NET MVC example I've come across, I always see Url.Content being used to reference CSS, JavaScript, and Images. Not once has anyone explained WHY to use it.

What's so bad about doing:

<img src="/Content/Img/MyImage.png" alt="My Image" />
<script src="/Scripts/jquery.js" type="text/javascript"></script>
<link href="/Content/Css/Default.css" rel="stylesheet" type="text/css" media="all" />

View 1 Replies

C# - Referencing Namespace From Web.Config?

Jul 27, 2010

Can I declare namespaces in the web.config so that I don't have to write using statements for each namespace in each of my codebehind files?

View 3 Replies

Referencing A MasterPage Control From Another Web Page?

Nov 2, 2010

I have a label control on my MasterPage that is used to display error information. If an error occurs on another aspx page or a Module.vb page, how can I display the exception in the label control on my MasterPage? I tried using a Session variable, however, it would not work in my Module.vb code-behind file.

View 31 Replies

Referencing Content From Master Page?

Mar 19, 2011

I have a Master Page that contains a Menu Control. Each menu item clicked is supposed to load a new aspx page. My problem is (since I'm new to Master Pages) actually loading a Content Page. This is what my MP code looks like and it's only just a snippet. The first set of code are the ContentPlaceHolders in my MP. The second set is the code in my code-behind file in my MP. Hope this makes sense. In the VB code, all I'm trying to do is load my Customer.aspx page. What am I missing?

HTML Code:
<asp:ContentPlaceholder ID="Welcome" runat="server"></asp:ContentPlaceholder>
<asp:ContentPlaceHolder ID="MainArea" runat="server"></asp:ContentPlaceHolder>
<asp:ContentPlaceHolder ID="CustContent" runat="server"></asp:ContentPlaceHolder>

Code:
Private Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick
Try
Select Case e.Item.Value
Case "mnuCustomerMaintenance"
MainArea.Page = Customer
End Select
Catch ex As Exception
End Try
End Sub

View 11 Replies

MVC :: 2 File Referencing From Within LogOn.aspx

Apr 10, 2010

I have written a custom membership provider for my MVC 2 app, and it all works fine. I wanted to force people to log in as soon as they went to the site, so set the authorization section of the web config to deny annonymous users. As expected, when you try and access the site, it re-routes you straight to the LogOn.aspx page. The problem I'm having is that when it initially jumps to the LogOn page, it cannot find any of the files referenced in the html header section.

The strange thing is I set a path to a css file as follows:

../../Content/site.css
yet in the page it shows up as
../Content/site.css

I even wrote a html helper that uses Url.Content on the paths passed in, but this still does not solve the problem. If I go to the LogOn page after the application has initially loaded, it references all the files correctly.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved