MVC :: Unable To Add ADO.NET Into Project In MVC Application
Aug 8, 2010I canot add ADO.NET into Project in MVCApplication!Athough , i use Dotnet3.5 sp1.
And In MVC. Can we have look at Code behind of 1 aspx in Home?
I canot add ADO.NET into Project in MVCApplication!Athough , i use Dotnet3.5 sp1.
And In MVC. Can we have look at Code behind of 1 aspx in Home?
I'm all set on the server side with the RSA key pair installed. Where I'm hung up is trying to get the job done on the web.config file ... can't seem to get the aspnet_regiis command string right. I am using the command string provided by the web host (DiscountAsp.net). Most (all) of the examples I read use a website on the development machine. I actually registered my project in IIS and tried that but it didn't work. In any case I would rather not have to go to the hassle of registering a project in IIS anyway if I can avoid it.
Details:
My web application project is in a folder on my local machine:
D:Projects<project name>
This is most recent (failed) attempt to use aspnet_regiis:
C:WINDOWSMicrosoft.NETFrameworkv4.0.30319aspnet_regiis.exe -pe "connectionStrings" "D:Projects<project name>"
Is it possible to just do this manually by looking at the NetFrameworkConfigurationKey_xxxxx.xml file and entering the values? Seems like it should be do-able except I'm not sure how to parse the xml file for the correct values.
On a related note, when I add the following code to web.config it "announces" that "The keyContainerName attribute is not allowed". Ditto useMachineContainer
[Code]....
In Framework 4.0
I have written all Master Page and User Control in one Web Application Form Project called "CommonUI"(Separate Folder), which I couldn't refer to Other Web Application Form Project(Separate Folder).
I got an error as "unable to access another project or web application".
The error is because each project, it treat as a seperate Web Application, How to over come this problem.
In Framework 1.0 I did same thing in Framework 1.0, where I have all User Control as One Web Application Form Project(Separate Folder) and it is referred in other Web Application Form Project(Separate Folder).
I am unable to register my control from another project in my current project. I have a commoncontrols project and a controlpanel project now how can i get the usercontrols from the commoncontrols project?
The controlname is ucReg.ascx.
I'm trying create unit testing for an existing website project (not web application project). I cannot access my under test classes unless I use accessor. However, if I use accessor, I have problem to initiate an object with passing arguments. I only want to create unit tetsing for App_Code. After searching web, and I found that I'd better to create a web application project using my current existing website project. From solution explorer, add new project ->using existing website. My questions is: what impact will have for my current website to create the new project? Should I just convert my current website to web application? If do that, will it cuase problems on my website? I am new on asp.net, still learning..
View 1 RepliesI just converted an ASP.NET Web Site Project to a Web Application Project in VS 2010. After I run the application though it seems that my class polymorphism broke. I don't have a clue as to why this could occur.
So in the following code when I call base.OnLoad(e) I am getting errors in the base class because the variable myString is null. In fact all the variables for the Base class are null. I can do
[code]....
I recently updated my VS2010 website project from .NET 3.5 to 4.0. Everything was working fine in the website project. Today I decided to migrate the website to a web application project as I have learned this is the best way to work in .NET. I split out all my class files into a separate class library and copied all my other content into my new project. Then I updated all the references and web.config.
When I build the class library, everything works great. The problem is happening when I try to build/debug the web application project. It is acting like all the controls are missing and it is also throwing a bunch of compile errors about the public properties I have in my master pages.
Control errors: "The name 'INSERT CONTROL NAME HERE' does not exist in the current context"
Master page errors:'System.Web.UI.MasterPage' does not contain a definition....
It is giving these errors for every single control and master page property in my entire solution.I notice when I add a new web.form to this project, it also adds a filename.aspx.designer.cs file in addition to the .aspx and .aspx.cs file. My existing files do not have these extra files since they were created in a different .NET version.
UPDATE: It seems I was missing the step where I need to right click on the new application folder and select "Convert to web application". I just did that and it seems to be a little bit better...
Now it is choking on Literals that are inside single quotes:
<div class='<asp:Literal ID="CssClassLiteral" runat="server"></asp:Literal>'>
It doesn't see this literal when it does the conversion... Is the above valid code or should I implement that functionality another way?
I was not able to do unit testing for our existing web site project. I converted the web site project to a web application project. I did some unit testing and changes on the converted web application project. However, my co-worker was doing UI testing on the web site project. We need put UI testing and unit testing to the web application project. Is it possible to move the UI testing code that my co-worker did to the web application project I am working? If so, how do you do it?
View 2 RepliesWhat is the difference between Web Application Project and Web Site Project ?
View 6 RepliesI made one application which consumes WCF service and also using nettcp protocal. As we know, WCF application requires .Net3.0 and .Net 3.5 framework. but we have some dealer machine which are having window server 2000 OS now i am not able to install .net 3.5 framework on dealer machine . So we are not able to upgrade old application with new application which are totally based on WCF framework .
View 1 RepliesIn my current project, I have a webservice file called MyServices.asmx. This webservice I want to reference in my Default.aspx.cs file.
My Code:
MyServices newService = new MyServices();
newService.addUser(txFirstName.Text, txLastName.Text, txtEmail.Text,
txtUserName.Text, txtPassword.Text, txtBalance.Text);
But when I refer to that webservice (as shown below), I get error saying: "The type or namespace name 'MyServices' could not be found (are you missing a using directive or an assembly reference?)"
What should I do to correct this error?
Current Solution of Adding Service Reference still gives me that error.
I have 2 folders - 1. Data 2. Presentation which is following the 3-tier model of designing programs.
I have a slight problem. I am trying to access a class which is found in the Data folder from a web form found in the Presentation folder. How can I do this? For some odd reason my project does not have namespaces.
I am trying to add a .aspx page in the project , but while adding the .aspx page i am not getting the option to choose existing master pages. I remember long back i used to get that option to select the master page.
View 2 Repliesthe project was not initially created using Ajax however, i now added the assemble"system.web.extensions" and copy the ddl to the bin folder. if i should manually add the code for the extenders they will work however, i am unable to drag and drop the extenders to a textbox or to a button or a pane
View 2 RepliesWhenever i run the project this problem occur Can any one give me solution. should i have to delete webdev.webserver.exe and install another is this the right solution for my problem.
View 1 RepliesI have a solution file which has 3 projects in it, which was developed in VB,VS 2003. when i am trying to open the solution file, framework is able to open the 1st and 2nd projects but for the 3rd project it was showing an error "Unable to get project file
from web server".
Does anyone know what could be the reason I am not able to add reference to System.Web. It gives an exclamation(!) symbol in front of the dll under reference folder in VS 1020. I wand to refer to System.Web.Security.MembershipProvider class.
View 1 RepliesI installed vs2003.net on sbs2003 with IIS6 (.net framework 1.1) I created my first app, put a label on webform1 and run the project (debug)
1 - messagebox: "Error while trying to run project: unable to start debugging on the web server. The project is not configured to be debugged (I did a lot of searching, found tons of so-called solutions, but neither works)
2 - run the project from the menu Start without debugging. I got a server-error: <authentication mode = Windows in web.config)
Two questions:
a. when the app runs under VS.2003 it uses IIS ?
b. if not, why doesnot run the app ? if so, which website it uses in the IIS-manager (is that the Default website or other ?). What happens when I delete all the websites in IIS-manager and run the app in VS2003 ?
Im trying to add a database to the project, and he following error appears. (Im using VB2008)
Local database file
A network-related or intance-specific error occured while establishing a connection to sql express.
The server was not found or was no accessible. Verify that the instance name is correct and that SQL server is configured to allow remote connections. (provider: Shared Memory Provider, error 40- Could not open a connection to SQL server.
I currenty have a project hosted on our server, when i open that project folder i see about half of the folders i should normally see, i dont see the Controllers folder, Properties folder, obj folder, as well as the csproj file. Before I could copy this same folder and put it on my laptop and after it brought all of them over it would show these folders. Now it wont, it just copies over what it sees, not the other folders...I'm trying to create a copy on my laptop that I can work on then publish it to the server...I was able to do this before just fine, now its not copying/generating the necessary folders/files to my comp
View 2 RepliesI am using an Visual studio 2010 ultimate edition. And here i have getting an error " unable to connect to the asp.net development server " while i try to run the Web Application by pressing F5 key from Web Application Project. Can any tell me whats the problem and how can i resolve it.
View 3 RepliesI started working on an Asp.net MVC website using Visual Web Developer Express 2008 a while ago. Just recently, I managed to get my hands on a copy of Visual Studio 2008 Professional (through DreamSpark ). I installed the Service Pack, and also the MVC2 files for Visual Studio.
However, now I can't open my project anymore. When I try to open the solution in Visual Studio, it tells me that the project type is not supported. Does this mean that I have to resort to using VWD Express again? Is there perhaps some way that I can edit the project file so that it will load and compile correctly?
Note: I installed MVC2 through the Web Platform Installer, and it says that it installed successfully. However, I notice that MVC references in my unit-test project don't seem to be resolved either - is this perhaps because MVC2 isn't actually installed properly?
I am not able to debug a Remote web project (Where the project files are located in another server which is in the same network). I am getting the below error message:
Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder,
Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Excel.Range.get__Default(Object RowIndex, Object ColumnIndex) at InventoryADD.Button1_Click(Object sender, EventArgs e) in
\10.38.23.228q1uatassettrackInventoryADD.aspx.cs:line 670
It works fine when i try to access the website through IIS. Shud i do some setting changes on VS 2005?
I've tried with
<trust
level="Full"
originUrl="" />
I created a ASP.NET project under Visual Web Developer 2008. Under that project I had a Database (along with ASPNETDB.MDF) which has about 3/4 tables (I had SQL server 2008). Everything was working fine (like insert, delete, etc.). And I was able to view the tables in database explorer view.
Then I had to format my computer for some reason and I copied the whole project in a USB drive and then after formatting the computer I copied the folder and tried to open it in Visual Web Developer (now I have VWD 2010). I can see the both Database under App_Data folder (ASPNETDB.mdf and the DB I created). ASPNETDB has all the tables and data as expected. But I do not see the tables under the DB I created.
When debug a project, then error message show:
"Error while trying to run project : Unable to start debugging on the web server. The project is not configured to be debugged."