Adding Reference To DLL Is Not Working?
Jul 8, 2010
I have created a VB DLL by selecting File - New - Project and then Class Library
I added a "Properties" region and a "Function" region with some simple properties and one simple function. Compiled it and used it in another app with no errors.
At that point the only references in the project were the default references when creating the new project.
I then created a function that will take a file as a param and get the physical path and add the 2 together. In the function I use the "Request.PhysicalPath" method of the System.Web.UI.UserControl.
I then added areference to the System.Web DLL in my project.
PROBLEM IS I get an error on "Request" that says "Name Request is not declared"
So I googled the error which I found a thread that said to "just use HttpContext.Current.Request.Form" because "by default all websites developed in Visual Studio 2005 is Inherited from System.Web.UI.Page and Class files won't that's the resion we have to add System.Web.UI.Page namespace in the class file"
However when I added the "HttpContext.Current.form." before my "Request.PhysicalPath" I get the same error on "HttpContext".
What Am I doing wrong?
System.Web.UI.UserControl
View 2 Replies
Similar Messages:
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
Oct 4, 2010
I'm new to .net
I've following line in my code:
using Microsoft.ServiceModel.Web;
And it works fine as long as I add the namespace reference to microsoft assembly dLL System.ServiceModel.
The moment I copy the code on other machine, I need to redo everything. Is there any way so that I don't need to add this reference again & again?
View 13 Replies
Jul 23, 2010
I need to be able to add a reference to ADODB in my code to access that particular COM object's result.
I have tried to add the adodb reference from the properties page of my site, but whenever I try to run the site after adding it I get this:
[code]....
To enable assembly bind failure logging, set the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLMSoftwareMicrosoftFusion!EnableLog].
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
END MESSAGE
Why would this be? I've not encountered this before when adding the adodb reference. The source of the adodb reference is:
c:Program FilesMicrosoft.NETPrimary Interop Assembliesadodb.dll
The file is indeed in that directory.
View 3 Replies
Apr 7, 2010
We have a web site that sits on a DotNetNuke platform and all of our coded modules are written in VB.Net for consistency. However, we have been sent a web page that works as a link and it is written in C# and references a cs file in its App_Code folder. If we try and load this into our website we get an error saying that it is not written in VB we then tried converting the homepage to VB but the reference folder is very complex and written in C#. Can we load the reference file even though it is C# and reference it using VB code. The current all is OurRemService RemService = New OurRemService(); where OurRemService is a file in the App_Code folder in the web page folder. The only other way around this is for us to set it up in IIS as a virtual directory and reference it directly but we would prefer to integrate it into our website.
View 1 Replies
Oct 17, 2010
Since a Web Site doesn't have a project file or a bin folder,
how will a Web Site identify of what are all the dlls to be used.
And if i am adding a third party dll to my web site, and i need to
add this web site folder to a source control, how should i include
this third party dll in the source control?
View 1 Replies
Jul 7, 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 any assembly reference for System.Net.
how it is working and where the assembly reference has been added and how?
View 4 Replies
Feb 2, 2012
I have a number of .Net web sites built in VS2010 using Framework 4.0that reference a web service to send emails.
My most recent site I created as a web application as opposed to a web site. In the Solution Explorer you can add a 'Service Reference' and, if you click the Advanced button you can then add a reference to a web service.
I did that and now the (web application) site won't build - it says it cannot load the Ajax dll. If I remove the reference to the web service, the site builds okay - if I add the reference back in, the site will not build.
Do I need to abandon the idea of using a 'Web Application' and turn it into a 'Web Site'?
View 9 Replies
Apr 13, 2010
1. Is there a reason why someone would want to add a reference to an assembly (e.g. System.Drawing) but not add the Using statement? Seems that if you add a reference, you should add the Using statement automatically, but maybe not always?
2. Correct me if I'm wrong, the only benefit of adding a "Using" statement at the top of your file, is to bring into scope an assembly and not have to fully type the class name? So if I have a Using System.Drawing, I can type in
string = Color.Tomato.ToString(); instead of string = System.Drawing.Color.Tomato.ToString();
View 3 Replies
Aug 25, 2010
I am getting this error while loading(adding) it into service References (web client)
The type 'WcfTrial2.Calculation', provided as the Service attribute value in the ServiceHost directive could not be found.
How to resolve it?
View 1 Replies
Mar 10, 2011
I have four tables test1, test2, test3, test4
they dont have any primary keys.
I have a patient entry table, which has patientID as primary key. if I want to retrieve tests information about a particular test then I have to add a pid as foreign key??
do i have to add a test_ID kinda field in all four tests tables????
how to do this in sql server management studio.
View 7 Replies
Feb 7, 2010
At my campus whenever i open my browser to surf the internet, it requires username and password, e.g IE shows a dialog box requiring uid and pwd then it allows to surf the internet. In short i am behind an authenticated proxy server.I am using vs2008 and trying to add web/service reference to my c# desktop application or asp.net web applicationwhenever i try to add reference it does not show any dialog box(for uid n pwd) and give an error as407 proxy authentication...i have googled at a lot, tried two KB articles but cannot find any solution
View 1 Replies
May 18, 2010
just added reference to jquery minified and block ui on my page through scriptmanagerproxy and it throws error on page load.
<asp1:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
<Scripts>
asp:ScriptReference Path="~/script/jquery-1.2.6.min.js" />
<asp:ScriptReference Path="~/script/jquery.blockUI.js" />
<asp:ScriptReference Path="~/script/Default.js" />
</Scripts>
</asp1:ScriptManagerProxy>
View 10 Replies
Oct 20, 2010
I added a service reference via the add service reference method. I can see all of its services in the intellisense but when I run the project and it executes the line where I instantiate the service : MyProjectName.ServiceReferenceName.IServiceReferenceClient
client = new MyProjectName.ServiceReferenceName.ServiceReferenceClient;it throws this error:Could not find default endpoint element that references contract 'ServiceReferenceName.IServiceReferenceClient' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
View 2 Replies
Feb 20, 2010
I'm adding a reference to a funciones.dll file using
clr.AddReferenceToFileAndPath() because I couldnt get it to work other way with this file and it succesfully does it. The file is named funciones.dll and it's in the bin folder. But when I do
from funciones import *
I get "no module named funciones"
since the funciones.dll file it's a funciones.py file compiled, shouldnt the module name only be named funciones and no any other name? isnt the name the problem and it's another? I dont know what other info could be relevant here but if there is any let me know
View 2 Replies
Apr 1, 2011
I have developed an asp.net web service and deployed it Win 2003 server on IIS 6. I tried to access it from my asp.net application which is in developer pc, i'm getting a dialog-box "Discovery Credential for Proxy Server"... which asks for a user and password.
Even when I provided right credentials it is not accepting. May be this is because of firewall. How can I get rid of this.
View 1 Replies
Sep 24, 2010
There is a C#.net libraray project whose dll name is customer.dll. It has a class name customer with a function name show(). I want to call this function from another project but dont want to add reference to the caller project. Can this be done? Is there any C#.net class that can acheive this?
View 1 Replies
Jul 8, 2010
I am adding a reference of class library in web service in VS2008 and it is not copying the .config file from class library to web service. I have checked the property "Copy to output directory" of .config file and its value is "Copy Always".
View 3 Replies
Sep 24, 2010
I am a bit new to ASP.Net Ajax and as such new to Ajax itself. I have a site which uses ASP.Net Ajax. It used the version AjaxControlToolkit version 3.0.30512.0. I have now changed it to version 3.5.40412.2 by deleting the old reference and adding a reference to the latest one . I build the soultion and everything appears fine witjhout any errors. But the site fails to load showing a yellow page with the message AjaxControlToolkit Version="3.5.40412.2" missing reference to 'AjaxControlToolkit.ExtenderBase.Base Scripts.js.BaseScripts.js'. What does this mean ?
View 2 Replies
Feb 19, 2010
I have a c# v3.5 framework site that I am doing some maintenance on. I wish to use Automatic Properties but whenever I try to add one, the compiler fails [as below]. I have added the System.Core.dll (and it is in the web.config ok) but still no joy.
Error 6 'XXX.Archive.TypeOfArchive.get' must declare a body because it is not marked abstract or extern
View 2 Replies
Aug 19, 2010
After moving application to shared hosting I cannot add service reference to .asmx and WCF services that used to work on dedicated server.The error in adding WCF service reference is:
There was an error downloading 'address ... Service.svc'.
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
Metadata contains a reference that cannot be resolved: 'address ... Service.svc'.
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
If the service is defined in the current solution, try building the solution and adding the service reference again.asmx web reference:There was an error downloading 'address ... .asmx'.
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
There was an error downloading 'address ... .asmx/$metadata'.The server committed a
View 3 Replies
Jul 19, 2010
I am using this method since a year to build my project, but I am really tried of it now. I have to find some good solution on it.
The issue is, in my solution I have some c# library projects(BO, BAL, DAL) and 1 web project which also contains a webservice.
My Webservice accesses BusinessObject classes to transfter data from webservice to Window Application programm.
Now when I am adding a webservice reference to this web application, I got some error like following
Error 34 Argument 1: cannot convert from 'TestSolution.Business_Objects.Synchro' to 'KeySoftlock.KeyWebService.Synchro' D:websTestSolutionKeySoftlockBusiness LogicWebServiceCaller.cs 296 62 KeySoftlock
so , for this what I am always doing is , I go into the Reference.cs of KeySoftlock project - auto created by VS when I add web reference- and delete the classes that are automatically generated there., and adds a namespace Business_Objects, so that both classes will be the same.
Now my project-solution builds properly! But now its really overhead of always doing this when I change the webservice reference from local to remote and vice versa.
View 6 Replies
Dec 8, 2010
[code]....
I have a folder named mycss and inside the css.Nothing goes green on the page(errors).
But the textbox is not changing appearance.
Note that the css works correctly if i create it inside the default.aspx page, "Style1" css file is with capital S, if it makes a difference.
View 18 Replies
Feb 19, 2010
I have just recently converted my VB code to C# and now having this error when I try to add an item to my listbox, and the value is coming from the item page. I get the error at this segement:
lstboxCart.Items.Add(cartItem.Display());
My listbox is supposed to add the product's name, quantity, and price onto one row.
Here's what I have so far:
[code]...
[Code]....
[Code]....
My guess is that the source of the problem could be in the foreach loop from my cart class, shouldn't I be using that for arrays only? If I need to post any markup code or any other class, let me know.
View 7 Replies
Apr 5, 2011
one juvenile question , i am having a asp.net intranet application which is using jquery, instead of ref jquery to every page, i decided it to put it on the master page inside the script manager scriptReference tag. note not all pages of my application requires jquery, so is it a wise thing to do, or it will affect the performance,
View 2 Replies