.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

MembershipUser exists in both...

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :ASP.Net

Everything was working fine then suddenly I've got this error all over the place. Not sure what I did wrong or what to do about it:

Error    3    The type 'System.Web.Security.MembershipUser' exists in both 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.ApplicationServices.dll'   

Any help would be appreciated.

View Complete Post

More Related Resource Links

Checking if a URL Exists


I've got a HttpHandler which outputs XML to the client to play video, it outputs the url to the video, video name etc... Validates the request etc.

However sometimes when i upload new video the main URL doesn't pickup the file from the CDN so i have to use a different URL to go directly to one of the main servers.

For example the CDN url is:
One of the server urls is:

What i want to do is check to see if the file can be reached off the .net url before posting it back to the user.


if http://videos.****.net/ar/ar_1003_scene_1.ext response then
> post http://videos.****.net/ar/ar_1003_scene_1.ext to client
> post http://videos1.****.com/ar/ar_1003_scene_1.ext to client

I hope that makes sense.

I thought of doing a WebRequest/WebResponse but i don't want the file to come back, i just wanna know if its there or not. My site is on a single server while all the video is on a CDN.

(i can't post the url because it's NSFW)

Edit: Why do posts not auto format?!?

Linq to sql does not return appropriate multiple result sets with "If exists" conditions in the stor


Hello All,

I have a stored proc that returns 4 resultsets, they are in the format.

ALTER PROCEDURE [dbo].[pGetManagerEmployeeSummaryDummy]

    @ManagerStaffID int,
    @PeriodID int



IF EXISTS (select 1 from dbo.temployee e
    inner join dbo.temployeedetail ed
        on e.staffindividualid = ed.staffindividualid
        and ed.periodid = @PeriodID  
    inner join Incentive.tRole r
        on rm.IncentiveRoleID = r.RoleID
    where ed.ManagerIndividualStaffID = @ManagerStaffID
    AND r.RoleID = 1) --Closer
        SELECT e.StaffIndividualID, e.LastName, e.FirstName, r.RoleName, e.xname, e.yname

from dbo.temployee e

inner join dbo.temployeedetail ed
            on e.staffindividualid = ed.staffindividualid
            and ed.periodid = @PeriodID

where ed.ManagerIndividualStaffID = @ManagerStaffID

Deleting a key container. Detecting if it exists.

I have a need to detect if a key container exists. I have looked at http://msdn.microsoft.com/en-us/library/system.security.permissions.keycontainerpermission(VS.80).aspxbut I have two problems. One, the 'Deny' method appears to be obsolete. When I copy the code from this demo I get a warning that Deny is obsolete and will be removed. Two, if I follow the instructions to delete the key from the container it seems to work but if I subsequently try to get the key from the container I get another key and there is no indication that any key had been removed. Any ideas on thus manipulating key containers? Thank you. Kevin

[C#] Database ".mdf" already exists. Choose a different database name.

Hi all, it's all day long that i'm fighting with this problem. And i'm getting quite upset! SHORT VERSION Why when i call DataContex.CreateDatabase() does SQLExpress 2008 say that the file already exist even if the file is completly wiped form the DISK!?!   LONG VERSION So, what i'm trying to do is damn simple. I'm developing a simple web application. To do that i've built a DBML file to use with LINQ. For development purpose i'd like to create a local DB. So here my code: string connectionString = ConfigurationManager.ConnectionStrings["PermissionsDatabase"].ConnectionString; Response.Write(connectionString); using (PermissionDataContext dataContext = new PermissionDataContext(connectionString)) { if (!dataContext.DatabaseExists()) { dataContext.CreateDatabase(); } }   And in the web.config the connection strin is: Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Projects\AccessControl\WebSite\App_Data\permissions.mdf;Integrated Security=True;User Instance=True When the CreateDatabase() is called i get that Exception. Where the ____ do SQLServer keeps track of that file?! Why if the database already exists the DatabaseExists() return false?!   Moreover if i use this connection string: Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\permissions.mdf;Integrated Security=True;User Instance=True

Is there a way to check if workflow instance already exists for a particular productID in Workflow o

I am using Visual Studio 2008 and .NET 3.5. I am trying to build a WF that is exposed as WCF hosted on IIS. This service is consumed by ASP.NET client. It is a very simple WF- receive info for new product "A"- send email to person 'Xyz' that new prodcut "A" is received- do some business process for product "A"- send out more notifications for product "A"Consider this scenario - - Client hits submit on asp.net page for prodcut "A"- new WF instance is created for product "A"- client can go back to the same page, edit some more info and hit save again. However, this time or for any subsequent "Saves",  I do not want to create a new WF instance for product "A".I can check to see if a WF instance exists for product "A" on the client side before calling the service operation. However, I want to see if there is a way to do this in WF or WorkflowServiceHost, as I don't want to add this logic to client. First acitvity in WF has to be receive activity with CanCreateInstance = true, so not sure how I can do this check in WF itself.Also, I have another stupid question, when using WF exposed as WCF service, do we have to implement all service operations using WF? What if I have some service operations that just involves checking some business logic? Do I implement this in a

LinQ to check if xml node exists in the XML??

Using LinQ or any C# syntax, I just want to know whether "Item" Child exists or not if the parent Node (ChildMenuSelected>>MenuSelected) are true from the below xml format.Xml Format:<MenuDataResult> <Items> <Item> <ItemType>Submenu</ItemType> <ItemTitle>Level22</ItemTitle> <Menu> <MenuSelected>false</MenuSelected> <ChildMenuSelected>false</ChildMenuSelected> </Menu> </Item> <Item> <ItemType>Submenu</ItemType> <ItemTitle>Level21</ItemTitle> <Menu> <MenuSelected>false</MenuSelected> <!--if ChildMenuSelected = true --> <ChildMenuSelected>true</ChildMenuSelected> <Item> <ItemType>Submenu</ItemType> <ItemSubType>0</ItemSubType> <Menu> <!--if MenuSelected = true --> <MenuSelected>true</MenuSelected> <ChildMenuSelected>false</ChildMenuSelected> <!-- whether this below item exists or not --> <Item> <ItemType>Submenu</ItemType> <Menu> <MenuSelected>false</MenuSelected> <ChildMenuSelected

Directory.exists() and spaces

I have two directories: "D:\My First" and "D:\My_Second". If I call "Directory.Exists(loc)" where loc = "D:\My_Second" it returns true, but if I call "Directory.Exists(loc)" where loc = "D:\My First" it returns false. Both directories really exist. If I change the space to an underscore in both my directory and the value of loc the call to "Directory.Exists(loc)" returns true. I'm using C# (via Visual Studio). What can I do to get Directory.Exists() to accept spaces?  

Can not copy: The file exists. (Explorer View)

Hello Community,               I used to copy bunch of files from windows explorer to sharepoint 2007 document library in its explorer view. But now I could not. It gives me error "Can not copy xyz: The file exists". The files does not exists already.             I also created many different new files [Different Name/Different File Type] and copy to server but still no luck. I have logged in to SharePoint with Admin Account and verified that no such file already exists.             I have the many machines and using Windows XP and Windows 7. For Windows 7 I never found the problem and Windows XP [with IE 6] if I use normal user for windows logon [Normal user have the “Full Control” permission in SP] I cannot use drag and drop files. It shows the error message “Cannot copy file <filename> The file exists”. For “My Network Places” I created and point to document libraries such as http://serversite/Docs [“Docs” It’s a document libraries list] but no luck. I tried from multiple Windows XP workstations and It works in few but cannot make out any differences between these machines.          &n

Dealing with a databound DDL inside formview when SelectedValue no longer exists

Hi forum heros!  I have a page that has a formview on it.  Client info, name, address, usual stuff.  The formview is populated by a DataSource, that calls a SQL stored procedure for the client info.  It all works great. Within the formview, I have a dropdownlist for the Staff assigned to the client (StaffId is a member of the Client record called during the Formview binding).  When the formview is in Item mode, the Staff name appears in a label, when in Edit mode, the dropdownlist is bound and populated by another DataSource that calls a stored procedure of ActiveStaff. When the assigned staff exists, the StaffId is correctly bound to the DDL SelectedValue and the current staff name appears selected in the DDL when in edit mode, as it should. So here's the problem: Staff quit and become inactive.  So when the client record is pulled up, the StaffId (bound from the Formview) is no longer in the ActiveStaff list (used in the DDL) and the DropDownList bind fails (loudly - not sure why it couldn't just fail to zero, but there you go). Anyway, I know how to check for whether a record exists and manually bind dropdownlists that are outside formviews, but is it even possible within a formview? Any direction here would be appreciated. Thanks in advance.  

How to check if SPFiled already exists?

hi   I donot know the internal name and cannot use title for retreiving the filed because user can add 2 fields with the same title. Is there anyother option to check if filed already exists?

Record is already exists in Dimension table but still Kimball SCD Component is Identifying it as a n

Hi I have loaded Dimension table. Now even if the record already exists in my dimension table , every time I run package Kimball method SCD component is identifying as a new record. Please advise. Thanks, Anuja

IF EXISTS(then how to store fld value in variable)


check user exists in which group

After entering user name, i want check user belonging to which group, group is some thing like role based if group is something group1 , then i want redirect hime to page 1, if groupis 2  then page 2 like that

How check if file exists?

Hello I want to delete file, i can do this but firstly i want to check if it exist. What must i add to  my code for this? DECLARE @del varchar(50) SET @del = REPLACE(' del C:\ADFS\Data_'+CONVERT(char(10),dateadd(year,+1,DATEADD(dd, -1, GETDATE())),103)+'.csv','/','.') EXEC master..xp_cmdshell @del

The type '' exists in both '' and ''

For some reason though it appears that one of my class files (_common.cs - in the App_Code directory) is being included in the WAP .dll file as well as when it compiles the App_Code at runtime.error CS0433: The type 'inlinehockey._common' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\25321638\9b5c4b00\assembly\dl3\3657f4e6\cd91aef5_4d5cc601\inlinehockey.DLL' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\25321638\9b5c4b00\App_Code.xad_ajc1.dll'  The error was not knowing what dll to use for the type when you get the CS0433 error.How can I get round this error?ThanksJeremy Thakewww.made4the.net

Need to create a stored procedure on a db if that db exists..

IF   EXISTS (SELECT * FROM sysdatabases WHERE [name] = 'test') BEGIN use test Create   Procedure test @empno int, @empname varchar (50), @loc varchar (50) as print   'it is a msg' end   getting the error msg Msg 156, Level 15, State 1, Line 6 Incorrect syntax near the keyword 'Procedure'. I need to deploy this sp  only if that db exists to around 400 db servers in a batch... I heard within begin.. end .. we should not include DDL's .. but i need to find a work around...  thanks   

The type 'CrystalDecisions.Web.CrystalReportViewer' exists in both 'c:\WINDOWS\assembly\GAC_MSIL\

Dear, I have vs2005 and vs2008 in server machine. everything is fine. but when i want creating crystal report in vs2008 i got this problem. i have no CrystalDecisions.Web.dll in webs bin directory. and no multiple version in web.config file. how can i solve this. plz reply quick.   Jewel
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