.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Problem in Web form app with reference to system.web

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :.NET Framework


System: VS.NET 2010 Professional on Windows 7, targeting framework 4.0

I am developing a Win Forms app. Within my company another developer (he has now left his position) has developed a NET- component with some nice features I would like to use. The component has some references to System.Web. When I add a reference to the component Compax, I get Intellisense in VS.NET for writing

using Compax.Framework.DataAccess

But as soon as I try to compile I get two errors:
The type or namespace name 'Compax' could not be found (are you missing a using directive or an assembly reference?)

The other one reveals a bit more:

Warning    1    The referenced assembly "Compax.Framework, Version=1.1.10908.1, Culture=neutral, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.   

So I try to add a reference to System.Web. But it is not in the list, probably since the current project is a win forms app. I can find the System.Web.dll by browsin

View Complete Post

More Related Resource Links

Problem upgrading to MVC3 - System.Web.Routing



I'm trying to upgrade to .NET 4 and MVC 3.

When trying to compile my project, I get the error:

Error 1 The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) C:\Users\spencer\Desktop\weblauncher\Common\MVCConfig.cs 4 18 Common

The type or namespace name 'Routing' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

I do have the System.Web.Routing in my references for the project.

BUT - when I try to view System.Web.Routing in the OBJECT BROWSER, nothing is inside!  The System.Web.Routing namespace is not in there - the entire thing is empty!  Could it that the dll is corrupted?  I tried to reinstall the .NET 4 and MVC 3 stuff, but its still empty!

The dll is coming from here:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.Routing.dll

and the runti

Problems moving an InfoPath form from a DEV system to QA environment


We developed an InfoPath form using a local DEV environment.  The site collection under which the form was developed was http://server1/.

We are now attempting to deploy this form to a TEST environment that uses a slightly different structure for the collection, namely http://server2/sites/sitecol1.

In both cases the site that contains the form is /fin (so we were using http://server1/fin in DEV and want to use http://server2/sites/sitecol1/fin in TEST). 

The form contains VBA code and so requires admin-based deployment via Central Administration, so to deploy to TEST we:

1. Publish the form against the TEST server using InfoPath Designer

2. Upload the form using Central Administration > Application Managment > Manage Form Templates

3. After upload, we activate the form for the site collection http://server2/sites/sitecol1/

4. The form is then associated with a Form Library

When we try to create an instance of the form within this library we get the following error when we click on New to create the form instance:

The following location is not accessible, because it is in a differ

c# form problem with list item


I've got a c# form containing a listbox how ever i cant get

listbox1.items.Selected      to work



neither work. both not giving me the option for .selected nor selectedvalue

how does this work on c# forms as it works the above way on webforms....

System.Net.Mail HTML Template Problem


What do I need here ?????? To make this work??

Dim MassMail As New MailMessage()

        Dim Template As ??????????????

        MassMail.To.Add(New MailAddress(TextBox_massemailto.Text))
        MassMail.From = New MailAddress("You@me.com")

        ' MassMail.CC.Add()
        MassMail.Subject = TextBox_massemailsubject.Text
        MassMail.Body = TextBox_massemailBody.Text
        ' MassMail.Body = Template.BodyFileName = "EmailTemplates/BusinessAdBrochure.htm"
        MassMail.Priority = MailPriority.High

        Dim smtpclient As New SmtpClient("relay-hosting.secureserver.net")
        smtpclient.Credentials = New System.Net.NetworkCredential(""You@me.com"", "pasword")
        smtpclient.Port = 25
        smtpclient.EnableSsl = False

Problem with DuplexChannelFactory(System.ServiceModel.InstanceContext, System.ServiceModel.Descripti

I have derived a class from DuplexChannelFactory, and one of the constructors of the derived class takes System.ServiceModel.InstanceContext and System.ServiceModel.Description.ServiceEndpoint arguments. I simply pass them down to the base DuplexChannelFactory class, e.g.: public DerivedDuplexChannelFactory(System.ServiceModel.InstanceContext instanceContext, System.ServiceModel.Description.ServiceEndpoint endPoint) : base(instanceContext, endPoint) {} The problem I am running into that I get timeout exceptions when trying to callback the client during a service call, e.g.: Client subscribes to Service Client calls some Service method, during which call the Service will callback to the client Before I go further, if I call down to a different base constructor of DuplexChannelFactory, things work perfectly, e.g.: public DerivedDuplexChannelFactory(System.ServiceModel.InstanceContext instanceContext, System.ServiceModel.Description.ServiceEndpoint endPoint) : base(instanceContext, endPoint.Binding, endPoint.Address) {} If I use the former, I get the following exception: "This request operation sent to http://schemas.microsoft.com/2005/12/ServiceModel/Addressing/Anonymous did not receive a reply within the configured timeout (00:00:59.9820000). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still pr

Problem with System.Web.UI.DataBinder ??

Hi. I want to edit some fields in GridView so i wrote a code, but i need to use Eval() method and rowcommands so as i read in book i need to use ystem.Web.UI.DataBinder class which is part of System.Web.UI. I added but still got the problem:'ASP.default3_aspx' does not contain a definition for 'GridView7_RowDeleted' and no extension method 'GridView7_RowDeleted' accepting a first argument of type 'ASP.default3_aspx' could be found (are you missing a using directive or an assembly reference?)Here's my assemblies:using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;

POST from html form viewstate problem

<p> Hi all, I have a website where people need to pay for a specific download (.pdf file). After they payed they get the download(A). My payment-provider can do a HTML-Postback to the site i want, for each succesfull payment. So the idea is that if someone payed, they do a postback to my server with a couple of parameters, so i can know that that specific email address has payed, and they get the download. I tested localy with a .html file on my desktop to postback a set of parameters to my local asp.net website. But in ONLY works if i include the __VIEWSTATE in my html file. And i cant get rid of the viewstate in my HTML of the aspx page. >test.html: <html><head></head><body> <h1>Dit is een test</h1> <form id="form1" action="http://localhost:25659/WebForm1.aspx" method="POST"> <input id="Button1" type="submit" value="submit!"/> 'IT ONLY WORKS IF I INCLUDE THE NEXT LINE: <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMjA0OTM4MTAwNGRk" /> </form></body></html> Has anybody an idea to acomplish my goal? Maybe i can get some info about the postback in my global.asax? or create a HttpHandler for .html files? Anyone?   Thanks in advance, Vincent   </p>

Problem to install MS SQL 2005 on Window 7 Operating System

Hi, I recently have problem to install MS SQL 2005 on Window 7 Operating System. Setup showing an error for compitability issues. When click on to button to check for solution online, after a while it pop up that No solutions found for Microsoft SQL Server 2005. Any one know solution for this? Is is possible to install Microsoft SQL Server 2008 on Window 7 and migrate data from Microsoft SQL Server 2005 to 2008? Please advice. Appreciate your help. Thanks.

Sharepoint check-out document cross reference problem

Hi I have a problem with check-outed word document from Sharepoint Services 3.0. After I check-out document from Sharepoint, cross references in Word document stop working. After I click to cross reference (Ctrl+Click to follow link), Word show me warning message: "Some files can contain viruses or otherwise be harmful to your computer...Would you like to open this file". There is two buttons - OK and cancel. After pressing OK nothing happens. I have Sharepoint Services 2003 (clear installation, no custom code), MS Word 2007 and trying .doc file format. I tried this on two Sharepoints and two client computers, but it is the same. I tried http://support.microsoft.com/?scid=kb%3Ben-us%3B925757&x=8&y=9 , but did not help. How can I disable this behavior? Thanks

namespace of fields problem when creating form template from xml?

I created a form template from a predefined xml, where I do not have any namespace. Later I added more fields. The output xml of the form is for the fields from the xml they have not prefix, for those added later, they have prefix my. I already have them all done. How can I make them consistent to have prefix my? Is there any options in InfoPath to turn on or off the prefix my?   thanks,

ListData.svc form library problem

Hey, I can use this listdata.svc/Tasks?$select=title for a list. but I can't use it $select=name/Name for a form library, it saids "web page can't be found". but if I remove $select=name it can be displayed. Does anybody have idea about $select columns for a form library? Thanks in advance! Lindyhttp://www.dreamingcatstudio.com

System.NullReferenceException: Object reference not set to an instance of an object

        BVWS.Vardering oWS = new BVWS.Vardering();        BVWS.strucBPVardering oSvar1 = new BVWS.strucBPVardering();        BVWS.StrucPaket oPaket = new BVWS.StrucPaket();                 if (Page.IsPostBack)        {             oSvar1 = oWS.BpVardering("", "", regnummer.Text, "2000", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", DropDownList1.SelectedValue);      tdCHK1.Visible = false;                  try            {                if (oSvar1.rubst01.Length > 0)                {                   

Problem with AJAX - " Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'Syst

Hi., I'm using Visual Studio 2008 and i downloaded the toolkit from Codeplex, I downloaded the zip file which i've marked red in the below link.. This is my code, <form id="form1" runat="server"> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> <asp:Panel ID="Panel1" runat="server"> Hi Simbu AJAX Works Fine ! </asp:Panel> <asp:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" TargetControlID = "Panel1" Radius = "6" BorderColor = "#FBB117" Corners = "All" > </asp:RoundedCornersExtender> </form> & this is the error i get, " Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' " I saw this post, http://forums.asp.net/p/1273185/3439540.aspx and i changed my TOOLSCRIPTMANAGER into SCRIPTMANAGER & now i get this error ! and now c what this post says... http://forums.asp.net/t/1529516.aspx NOW WOT AM I SUPPOSE TO DO ??? PLZ GUIDE ME ! I'm struck up with this since 2 days....

Cannot convert from 'int' to 'System.Data.OracleClient.OracleParameter' - Problem with OracleHel

Hi I downloaded the OracleHelper.cs & I use VisualStudio 2008,I'm suppose to pass values to a stored procedure which accepts 2 parametersWhen i pass from codebehind it says,Cannot convert from 'int' to 'System.Data.OracleClient.OracleParameter'Cannot convert from 'string' to 'System.Data.OracleClient.OracleParameter'The best overloaded method match for 'DataWrapper.ExecuteNonQuery(string, System.Data.CommandType, string, params System.Data.OracleClient.OracleParameter[])' has some invalid argumentsI'm posting mycode,Using STORED PROCEDURE,OracleHelper.ExecuteNonQuery (con, CommandType.StoredProcedure, "sample", Int32.Parse(TextBox1.Text),TextBox2.Text); Plz help !______________________________________If possible,  tell me a solution for this error too !http://forums.asp.net/t/1598804.aspx

AJAX Form POST Request to a DLL Problem

I am using AJAX javascript for POSTING a complete HTML form to the server which is an external dll on a different server and displaying the response. The server-response is displayed in a "div" . basically i need to show a poll in a .aspx page which is basic a question with 3 options & a button. Now on click of submit button i need to post the data to a dll & show the result from the dll itself. Any idea how to do this? is it possible..any code???

System.Net.Mail e-mail header info problem

I'm new to using the system.net.mail class and I'm having trouble with a small program I'm writing.  I use my SendMessage() to send an email public static void SendMessage(string msg)         {             System.IO.File.Copy(mySource + msg, destSource + msg);             MailMessage mail = new MailMessage("from@me.com", "to@you.com, msg, "");                        Attachment attch = new Attachment(destSource + msg, "text/plain; format=flowed;reply-type=original"); //content-type text/plain                                   mail.Attachments.Add(attch);                                  MessagingCenter.client.Send(mail);             mail.Dispose();         } However, the email sent

Need to solve Form Authentication Problem

Hi all, I have a web site with login page and other pages. For login page currently i put authentication mode = Form. Problem is, when login 2 diffenent user in same pc and 1 browser with 2 tab, first tab is 1 user and 2nd tab is another user. I used Form Authentication ticket ,so for each users has different tickets. After login the 1st user and create a entry , then 2nd user login and trying to create entry that time 2nd user ticket is reset to 1st user ticket. is it any way to avoid this issue? if anyone knows about this please give me your suggestion and example. Thanks S.Shangar  
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend