.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

build error allowDefinition='MachineToApplication beyond app level, can be caused by virt directory

Posted By:      Posted Date: October 05, 2010    Points: 0   Category :ASP.Net

Hi I used the converter wizard in VS 2008 to  convert a web application from 2003.  I get one build  error as described above.  I went into IIS and created a virt directory but still get the error.  Any ideas?

Thanks Paul. 

View Complete Post

More Related Resource Links

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond applic

You may get this error when trying to browse an asp.net application. The debug information shows that "This error can be caused by a virtual directory not being configured as an application in IIS." However, this error occurs primarily out of 2 scenarios. 1. When you create an new web application using visual studio.net, it automatically creates the virtual directory and configures it as an application. However, if you manually create the virtual directory and it is not configured as an application, then you will not be able to browse the application and may get the above error. The debug information you get as mentioned above, is applicable to this scenario. To resolve it, Right Click on the virtual directory - select properties and then click on "Create" next to the "Application" Label and the textbox. It will automatically create the "application" using the virtual directory's name. Now the application can be accessed. 2. When you have sub-directories in your application, you can have web.config file for the sub-directory. However, there are certain properties which cannot be set in the web.config of the sub-directory such as authentication, session state (you may see that the error message shows the line number where the authentication or sessionstate is declared in the web.config of the sub-directory). The r

Error on Display user's fullname using Active Directory in asp.net using vb.net



wi As System.Security.Principal.WindowsIdentity =  _System.Security.Principal.WindowsIdentity.GetCurrent()



Dim a As String() = HttpContext.Current.User.

Web Part working fine on the top-level page but 'Not Safe' error on lower-level pages.


I have created a Web Part which reads and parses the SharePoint logs in order to display usage information of the page it resides on.  The Web Part works perfectly on the top page, reading and displaying the information desired.  However, once the Web Part is added to any page lower in the site heirarchy (sub-page) the same Web Part throws the following error:

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.

Show Error Details
Hide Error Details

[UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.]
  at Microsoft.SharePoint.ApplicationRuntime.SafeControls.GetTypeFromGuid(Guid guid)
  at Microsoft.SharePoint.WebPartPages.SPWebPartManager.CreateWebPartsFromRowSetData(Boolean onlyInitializeClosedWebParts)

Of course the current version of the Web Part is in the SafeControls list on the web.config.

The Web Part was originally designed to return site activity only for the top default.aspx page and worked fine but started to fail in the manner described above once I added the following line of code to return a SPCo

Msg 15121, Level 16, State 10, XP_Cmdshell - A call to 'CreateProcessAsUser' failed with error cod

I have the XP_cmdshell issues for the past two days in SQL2005 SP2 environment. There is a domain account with sysadmin privilege. I have created a proxy account and gave the execute privilege for xp_cmdshell. If i try to run the following commmand EXEC master..xp_cmdshell 'dir *.txt' Msg 15121, Level 16, State 10, Procedure xp_cmdshell, Line 1 An error occurred during the execution of xp_cmdshell. A call to 'CreateProcessAsUser' failed with error code: '1314'. But if i give sysadmin priv and then i try to execute. It worked. I cant give sysadmin priv so i m using a proxy account. Whether any one have solution for it.

Error Build: Type or namespace could not be found, when referencing a web service

Hello, I'm new in writing C# application in Visual Studio 2008. I'm currently writing a web application for CRM 4.0 Reporting Service rendering. I reference my web application to our Reporting Service web service http://reportservername /ReportServer/ReportExecution2005.asmx and name it 'RSWebReference'. Then I want to reference it in my code: Using RSWebReference; Not sure why, but I cannot build my solution, saying "The type or namespace name 'RSWebReference' could not be found (are you missing a using directive or an assembly reference?)". I read this thread in http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/74f70e30-83e8-4817-b5e0-7729450730a1 that the website probably is using .net 1.1, and I should change it to .net 2.0. However, I think the website is already using 2.0. Is it probably because I'm using VS 2008? How can I tell and change if the website is using 1.1 or 2.0? Or could I be doing something wrong? Thanks in advanced for your help! -Elizabeth K.

Transport Level Error

Hello,I have a ASP.NET 2.0 based web application. At a certain point, I restore a specific MS Sql Server Database from a previously saved backup. The restore works perfectly, however, when I try to access the application again I encounter this error:A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)If I just refresh the page, or in other words, I wait for a few moments and then access the web application, it works just fine. I am at a fix understanding as to what may be causing this. I have gone through couple of other posts in this forum and other material on the internet talking about Connection Pools and so on. At the end, I am still unable to resolve this issue? Should I stoop to a lower level and just add some sort of delay after the restore is done, so that the user will never (hopefully) encounter the above said hiccup, or is there a smarter way to deal with this?Also, I am using NetTiers template to access my MS Sql Server database.Any suggestions are welcome! Thanks!

wcf in a sub directory of an web apps... (error)

Hi, We have an application 2 applications(asp.net), one is the web apps and the other one is wcf. we currently hosted those two into two different servers. It works fine... unfortunately our application having a security issue... and the solution is to have a sub directory in web apps, which is the wcf... BUT we got this error... The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: ' 3 stars and a sun

Msg 8624, Level 16, State 13 - Internal SQL Server error.

Hi, I have a weird T-SQL 80 query full of nested subqueries full of aggregations tha thas been embedded in a view. if I do select * from the view I get: Server: Msg 8624, Level 16, State 13 Internal SQL Error.  If I run the same block of code from the query analyzer it runs fine. Also if I wrap exactly the same code in a SP it runs fine. I'm running this on a SQL Server 2000 Standard Edition SP4 8.00.2282. + I turned on the following Trace Flags: 3614, 9052, 9054, 9056, 9057, 9185, 9256. If I restore the same DB on a SQL Server 2005 and do the same select * it runs fine. So I'm getting the Error 8624 only on my SQL 2000 Standard edition  SP4 8.00.2282. Another thing I dont understand is also: why I can compile the view but if I try to visualize even the query plan I get the same error?!? Any suggestion will be appreciated. Thank you. Regards, Marco    

Expression evaluation caused an overflow error when calling ExecuteResultSet(SqlServerCe.ResultSetOp

HelloWhen I call ExecuteResultSet(SqlServerCe.ResultSetOptions.Scrollable) I am getting the following error when the data type is Numeric(18, 4):Expression evaluation caused an overflow. [ Name of function (if known) =  ]The numbers involved are not that big and work fine when ExecuteReader() or ExecuteResultSet(SqlServerCe.ResultSetOptions.None) are called on the same SQL.Any ideas? Thanks in advance!Cheers,DaveCode:Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click        Dim errorDescription As String = String.Empty        Dim numericNumber As String = String.Empty        Try            Using sqlCE As New System.Data.SqlServerCe.SqlCeConnection("Data Source = '" & My.Application.Info.DirectoryPath & "\MyDatabase.sdf';")                sqlCE.Open()                Dim sqlCECommand As SqlServerCe.SqlCeCommand = sqlCE.CreateCommand()                sqlCECommand.CommandText = "SELECT SUM(MT.TPM_Measure1) AS CurrentAmount FROM BUS_Table MT"                System.Diagnostics.Debug.WriteLine(sqlCECommand.CommandText)                Dim reader As System.Data.IDataReader = Nothing                If RadioButton1.Checked Then                    reader = sqlCECommand.ExecuteReader() 'Works fine                ElseIf RadioButton2.Checked Then                    reader = sqlCECommand.ExecuteRe

VS2010 Web App does not build Release - Could not load AjaxControlToolkit error

I have a VS2010 Web Application that uses the AjaxControlToolkit. I am able to build the Debug configuration. When I build the release configuration I get the following error message: Error 89 Could not load file or assembly 'file:///S:\My Code\Libraries\ACT\May 2010\AjaxControlToolkit.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) S:\My Code\EZFishing\EZFishing\EZFishing\SGEN EZFishing The location of the file is correct, and I just downloaded and unzipped there the Ajax CT. I have always built this app correctly before upgrading to VS2010 and ACT May 2010. Any idea of what is going on? Thank you in advance for your help. Mauro  

SSIS Package Protection Level Errors - decrypt protected XML node "DTS:Password" with error 0x800900

Error 7 Error loading GetData.dtsx: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.   c:\Packages\GetData.dtsx 1 1  Error 8 Validation error. Data Flow Task: OLEDB Source [5310]: The AcquireConnection method call to the connection manager "SourceServer" failed with error code 0xC0202009. GetData.dtsx 0 0 Environment I need to execute - BIDSHave Solution, with files linked with VSS. When I click on package, aforesaid errors show up and package opens in designed.Protection Level : Encrypt Sesitive with User KeyThis means it'd run only on machine and by user where and who created respectively.So I changed it to Encrypt Sesitive with Passoword and provided Passoword. No luckSo I changed it to Do not save sensitive, as anyways in the connection manager, it has Expression saying @Variablename (with appropriate correct syntax), and variable is mapped to config file. I tired with Config file and also by hardcoding the value in the connection manager's connection string after removing the variable name, also tried by hardcoding value in variable value and disabling config file.Nothing works. I read 3 threads discussing this issue by othe

SQLVDI error in eventlogs, caused by ntbackup

I wanted to prevent ntbackup from locking my databases during the nightly backup,  so I excluded the ...\Data folder from the backup set.  However, I think that ntbackup is backing up the databases during the volume shadow copy phase of the backup, even though their folder was excluded from the backup set (I verified this setting in the .bks file).  Although the lock only lasts a few seconds, the error message is worrisome and I would prefer to skip the databases completely.  How can I stop the volume shadow copy from doing this? Below is the the sequence of events leading up to the error, most recent first: Event Type: ErrorEvent Source: SQLVDIEvent Category: NoneEvent ID: 1Date:  3/23/2007Time:  3:01:49 AMDescription:SQLVDI: Loc=CVDS::Cleanup. Desc=Release(ClientAliveMutex). ErrorCode=(288)Attempt to release mutex not owned by caller.. Process=8684. Thread=7556. Client. Instance=. VD=. Event Type: InformationEvent Source: MSSQLSERVEREvent Category: (6)Event ID: 18264Date:  3/23/2007Time:  3:01:48 AMDescription:Database backed up. Database: master, creation date(time): 2007/03/12(15:08:23), pages dumped: 1, first LSN: 268:352:37, last LSN: 269:24:1, number of dump devices: 1, device information: (FILE=1, TYPE=VIRTUAL_DEVICE: {'{66DC3082-FB76-4312-AD74-4BDAD9FC7209}1'}). This is an informational message only. No user action is required. Event Type: InformationEvent Source: 

Directory lookup for the file failed with the operating system error 5

Hi I have a Windows desktop application that uses a SQLServer Express database.  The database files are downloaded from my website, followed by the application download (written in VBE).  The first procedure is to attach the database to the SQLServer instance from within the application. I have two test machines one runs Windows XP x84, the other Windows 7 x64.  I never have issues on attaching the database files in my test envirnoment but twice now other people downloading have got the following error System.Data.Sqlclient.sqlexception (ox 80131904) Directory lookup for the file C:\Documtents and Settings\Administrator\Desktop\Tem1.mdf failed with the operating system error 5 (failed to retrieve text for this error. Reason 1815) changed database context to 'master'. I'm not sure what the problem is and therefore how to correct the issue.  I attach the database in code using the create statement e.g. cmd7.CommandText = "USE Master CREATE DATABASE Tem1 ON PRIMARY (FILENAME = '" & DBFullPath & "') LOG ON (FILENAME = '" & DbLogPath & "') FOR ATTACH" Any help or suggestions would be very much appreciated. Chris    

Creating Database gives error : "Directory lookup for the file "xxxxx.mdf" failed with the operating

Hello FriendsI am creating Database using SQLDMOcode is as follows... Code Snippet SQLServer2Class server = new SQLServer2Class();server.EnableBcp = true;server.Connect(WebConfigurationManager.AppSettings["ServerName"] ,WebConfigurationManager.AppSettings["UserName"],WebConfigurationManager.AppSettings["Password"]);DBFileClass dbFile = new DBFileClass();           dbFile.Name = dbName;          dbFile.PhysicalName = "C:\\" + dbName + ".mdf";          dbFile.Size = 300;          dbFile.FileGrowthType = SQLDMO_GROWTH_TYPE.SQLDMOGrowth_MB;          dbFile.FileGrowth = 25;          dbFile.PrimaryFile = true;          LogFile2Class dbLogFile = new LogFile2Class();          dbLogFile.Name = dbName + "_log";          dbLogFile.PhysicalName = "C:\\" + dbName + "_log.ldf";          dbLogFile.FileGrowthType = SQLDMO_GROWTH_TYPE.SQLDMOGrowth_Percent;          dbLogFile.FileGrowth = 10;          Database2Class newDb = new Database2Class();          newDb.Name = dbName;          newDb.FileGroups.Item("PRIMARY").DBFiles.Add((DBFile)dbFile);          newDb.TransactionLog.LogFiles.Add((_LogFile)dbLogFile);          server.Databases.Add((_Database)newDb); This Code Generates Following Error !!]Microsoft][ODBC SQL Server Driver][SQL Server]Directory lookup for the file "D:\Projects\my_system\mySys

Exception caused by DataPager.SetPageProperties() on ListView (postback error)

 Hi, I have a issue with drives me crazy! I'm using the DataPager method SetPageProperties() to restore the current page in my listview after I navigated into a page related to a listview item. (I persist the current page in the session state) I display 10 items at a time, and there are 10 pages. Everything works perfectly for the first 100 items, .... but after I go beyond (to display pages 11 to 20), if I call SetPageProperties() to restore the proper "current" page, I cannot submit anymore anything without getting the following exception: An error has occurred because a control with id 'ctl00$ctl00$ContentPlaceHolder$ContentPlaceHolder1$m_ListViewSearchItems$lvProductsPager$ctl00$ctl10' could not be located or a different control is assigned to the same ID after postback. If the ID is not assigned, explicitly set the ID property of controls that raise postback events to avoid this error. The exception refers to the DataPager sub-controls which are not rendered the same way for first pages (1 - 10) than (11 - 21); Is that because it expect then a "previous page" button? I don't quite know what to think about it. Does anyone have a clue?

Error on build

hi, I am getting the following error when i try to build my WCF application in VS 2010: The type 'Namespace.Servicename', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found. Please help.

i cannot access iis virtual directory using http protocol..getting status code error 403

i am trying to connect to remote exchange using powershell..while using powershell session i get status error 403...i changed the settings in iis manager...i have set all the settings in the iis manager as said in the msdn support blogs...yet i get the same error when i access it in the client url and also in powershell of the client computer...if i cannot connect using powershell,can i connect using .net???somebody help me...i am beginner and i am stuck...
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