Quantcast
Channel: ASP.NET Administration
Viewing all 589 articles
Browse latest View live

problem publishing a website on IIS7.5

$
0
0

I know there are related posts here on this forum and another resources but I got stuck with this and couldn't proceed. Problem is I've done a website with VS2010 when I publish it to a FTP server and navigate to the url address I got an error.

The Web server is configured to not list the contents of this directory.at first i got a static file handler error but now this is displayin on page. I am sure that i've enabled directory browsing both in IIS and my web config.It turns to be a torture for me to deploy a website. 

<div class="post-text" itemprop="description">
  • I've enabled IIS services and static content
  • I've revert to parent the staticFile under handler mappings
  • I've registered the asp.net again in command prompt(the regiis.exe thing)
  • In IIS manager i've added my website adress under sites, stopped default web site and started mine.
  • I've added my site to classic.NET AppPool(integrated,and v4.0)
  • I've enabled the default browsing..
  • I've allowed isapi cgi restrictions
  • I've also tried downgrade the .net framework from 4 to 3.5 in VS 
  • I've done all the advices that generally covered..

Here is my web.config:

<configuration>
<system.webServer> 
<directoryBrowseenabled="true"showFlags="Date, Time, Size, Extension"/> 
<defaultDocument> 
<files> 
<addvalue="AnaSayfa.aspx"/> 
</files> 
</defaultDocument>
</system.webServer> 
<system.web> 
<compilationdebug="true"targetFramework="4.0"/> 
</system.web> 
</configuration>
any help would be greatly greatly greatly! appreciated.
</div>

Error publishing website with ASP.Net and IIS8.0 or IIS7.5

$
0
0
<div class="content-container">

I am trying to deploy a website which runs well with VS2012 IIS Express and Dev Web Servers. I am not able to deploy it on IIS7.5 on Win 7 and also tried IIS8.0 on a Win Server 2012 machine. I get the below error,

HTTP Error 500.21 - Internal Server Error

Handler "PageHandlerFactory-ISAPI-2.0" has a bad module "IsapiModule" in its module list

Detailed Error Information:

<div id="details-left">
Module   IIS Web Core
Notification   ExecuteRequestHandler
Handler   PageHandlerFactory-ISAPI-2.0
Error Code   0x8007000d
</div> </div> <div id="details-right">
Requested URL   http://localhost:80/TransportDemo/Default.aspx
Physical Path   C:\inetpub\wwwroot\TransportDemo_6_with_Gurobi\Default.aspx
Logon Method   Anonymous
Logon User   Anonymous
</div> <div></div> <div>The following is the web.config.</div> <div></div> <div>

<?xml version="1.0" encoding="UTF-8"?>
<!--
3.5 version
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
</configSections>
<appSettings>
</appSettings>
<connectionStrings />
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true" targetFramework="4.0">
<assemblies>
</assemblies>
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
<authentication mode="Windows" />
-->
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<customErrors mode="Off" />
<identity impersonate="false" />
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
<!-- controlRenderingCompatibilityVersion="3.5" -->
</pages>
</system.web>
<system.codedom>
<compilers>
<compiler language="C#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</compilers>
</system.codedom>
<!--
compilerOptions="/unsafe"
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="Default.aspx" />
</files>
</defaultDocument>
<handlers accessPolicy="Read, Execute, Script">
<remove name="PageHandlerFactory-ISAPI-2.0-64" />
<remove name="PageHandlerFactory-ISAPI-2.0" />
<remove name="ISAPI-dll" />
<add name="ISAPI-dll" path="*.dll" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="File" requireAccess="Execute" allowPathInfo="true" preCondition="bitness32" />
<add name="PageHandlerFactory-ISAPI-2.0" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
<add name="PageHandlerFactory-ISAPI-2.0-64" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
</handlers>
</system.webServer>
<runtime>
</runtime>
</configuration>

Can anyone please suggest a solution?

Thanks in advance.

</div>

w3wp.exe crashes in un-managed code dll for ASP 64 bit Classic web application on IIS 8 and (Windows 8 / Windows Server 2012) machine

$
0
0

Original post is @ http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/thread/c83c7549-483d-4701-a89d-04d4b339b0e0

HI

I am facing issue while trying to run 64 bit web application on IIS 8 and (Windows 8 / Windows Server 2012) in Classic mode. Every time app pool stopped due to w3wp.exe crash.

In IIS manager, I also set "enable 32 bit application" flag to "FALSE" in app pool setting to run 64 bit web application.

Following are some event log messages I am getting. 

Error 1:

 

Error 2: 

 

From Event logs, crash location is not clear so I debugged the web application and try to check the output window of Visual Studio 2012 at that time i found that all the managed code DLLs are loaded properly but when one of Managed code DLL trying to load un-managed code DLL THE w3wp.exe crashes and application pool stopped working.

What works:

  1. 32 bit version (Classic mode) of same web application is working on IIS 8 and (Windows 8 / Windows Server 2012) machine.
  2. 64 bit desktop application (using same DLLs as 64 bit web application) is also working fine on (Windows 8 / Windows Server 2012) machine.
  3. Same 64 bit web application is also working fine on IIS 7 (7.5) on 64 bit Windows 7, Windows Server 2008 R2 Machine.

Can some one please help me out?

Thanks in advance.

 

Register ASP.NET in IIS 8 on Windows 8

$
0
0

Looks like a problem here because aspx files handler is not registered in IIS.
Here's what I did: installed Windows 8, then VS 2012 and at the end, .NET 3.5.
I create a new website and deploy my ASP.NET application. Application pool has both .NET Frameworks v2.0 and v4.0. I have selected one .NET Framework, let's say 4.0.

IIS tells me:

HTTP Error 404.3 - Not Found

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

I am clueless, because what I understand from here is ASP.NET is not registered.
Also, on Windows 8 aspnet_regiis is not working and the trick of un-installing and then installing again .NET Framework by turn on/off feature from Control Panel does not solve anything.

.aspx is not running under IIS 7

$
0
0

I want to run a .aspx file thru IIS 7 having installed Windows 7 64bit. the address that I am passing is http://localhost/enquiry.aspx, where it is giving an error, page not found. even by default the page default.asp is also not running.  I saved the file enquiry.aspx in c:\inetpub\wwwroot folder. I checked whether IIS 7 is running or not, but I found it is running. I am new to this field. Please guide me hot to run the .aspx file.

Login.aspx continuously cycles

$
0
0

I have several websites (one for each subscriber) that each connect to a different SQL Server instance.  After setting up a new site in IIS7, I am unable to log into the new site.  However, if I bind an existing IIS7 site to the new site (in inetpub), the login works correctly.  Thus, everthing in the new site's code appears to be working correctly, so there has to be something about the IIS7 setup that is causing it to "bomb".  The logs contain no errors.  For the new IIS7 site, it simply shows a login.aspx request, followed by (after several calls for css layouts, etc.) another GET call on the login.aspx page.  When connected to an exisiting IIS7 site, it logs in and then shows a call to the default.aspx page by user "admin".  FWIW, the new site in IIS7 will return the correct login credentials when the "Forgot Password" link is activated.  So it is able to retrieve login informaton from the underlying SQL Server DB, it just won't login.  Any suggestions as to the what's happening?  Many thanks in advance.

Adding ASP.NET to a new web site on IIS 8

$
0
0

I have IIS 8 installed on Server 2012 with ASP.NET. Everything is working.

I created a new web site after the nstallation.

What is the right way to enable ASP.NET on the new web site? The role is already there so that's not the right answer.

Issue with Website Event 1310 IIS Issue

$
0
0

Hi All

I need urgent assistance with getting this ASP Website to work.

The website was working fine on the old Web Server (32-bit Windows Server 2003)

I migrated the entire website across to a new Server (64-Bit Windows Server 2008 R2)

Now when I access the website, I get an Application Error. The following are many warnings being logged in the Event Viewer.

Please assist as I need to get this Website up and running.

Event 1310, ASP.NET 2.0.50727.0

Event code: 3008
Event message: A configuration error has occurred.
Event time: 12/04/2013 10:35:06 AM
Event time (UTC): 12/04/2013 12:35:06 AM
Event ID: b82380f005d74ac0b20e8a7c568befeb
Event sequence: 1
Event occurrence: 1
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/11/ROOT-11-130102005060342963
    Trust level: Full
    Application Virtual Path: /
    Application Path: C:\Inetpub\vhosts\xyzwebsite.com\httpdocs\
    Machine name: WebServer
 
Process information:
    Process ID: 4672
    Process name: w3wp.exe
    Account name: WebServer\IWPD_51(xyzweb)
 
Exception information:
    Exception type: HttpException
    Exception message: Invalid access to memory location. (Exception from HRESULT: 0x800703E6)
 
Request information:
    Request URL: http://www.xyzwebsite.com/Default.aspx
    Request path: /Default.aspx
    User host address: <IP>
    User:  
    Is authenticated: False
    Authentication Type:  
    Thread account name: WebServer\IWPD_51(xyzweb)
 
Thread information:
    Thread ID: 10
    Thread account name: WebServer\IWPD_51(xyzweb)
    Is impersonating: False
    Stack trace:    at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()
   at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)
 
 


All app pool versions are v 4.0 but "It is not possible to run two different versions of ASP.NET in the same IIS process." error raise.

$
0
0

Hello,

We've got a very strange problem on our Windows Server 2008 R2 Standard (64bit) web server (iis 7.5).

All app pool versions are v 4.0 (and integrated Mode).

But When I reference 'Default Web Site', HTTP 500 error raise.

What I checked things, below.

1. when I changed 'DefaultAppPool' (Default Web Site's app pool) .net framework version to v 2.0, then error didn't occur.

2. when I change 'DefaultAppPool' .net framework version to v 4.0 and classice mode, then "It is not possible to run two different versions of ASP.NET in the same IIS process." error occured.

3. when I change 'DefaultAppPool' .net framework version to v 4.0 and integrated mode, then http 500 error occured.

<more informations>

1. SharePoint (v3) has been installed on this server.

2. so , When it was confirmed at the beginning, this server has two .net framework versions ( v2.0 , v4.0 ) app pool.

3. this server has three web site ( Default Web Site /  WebSite for sharepoint (at first v 2.0 (app pool's version) , it has already change app pool's version to v 4.0) / WebSite for Team Foundation Server (app pool's version is v4.0)) 

Please give me some advice..!

New Web Site vs. New Application Under the Default Web Site

$
0
0

Hello.

We have an ASP.NET web site/app and have always created a new application under the default web site.  We've had this ASP.NET site/app since the IIS6 days.  Our ASP.NET web site/app is an intranet only site, running on locally hosted/owned servers (just a single stand-alone server running Windows Server 2008 R2/IIS7.5 and SQL Server 2008 R2, which hosts and serves up our intranet site to internal users).  However, now that we're using IIS7.5 (and eventually IIS8), we're considering creating a new web site for our application.

So, what are the pros and cons of using a new web site vs. a new application under the default web site?

And, maybe more importantly, what is the recommended and/or standard practice - creating a new web site (with an application under it) or just creating a new application under the default web site?

Thanks in advance for the advice.

Web configuration Setting

$
0
0

Hi,

Where all web configuration setting is store in asp.net .I want to control Upload images by user.

thanks

Error when try to upload xlsx file in aspx file

$
0
0

Server Error in '/' Application.


Object reference not set to an instance of an object.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

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

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Webadmin_JRI_ManagePopularRecharges.btnSave_Click(Object sender, EventArgs e) +220
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565



Version Information: Microsoft .NET Framework Version:2.0.50727.4016; ASP.NET Version:2.0.50727.4016

ASP.NET IIS Configuration issue

$
0
0

I get the a Unrecognized attribute 'targetFramework' error when I browse to my asp.net 3.5 application that has been built to target any cpu (32 or 64 bit). It is configure to use an app pool with .net 2.0 and enabled 32 bit applications is set to true. It is using IIS 7.

I have done a find in the web.config for target framework attribue and it does not exists. Does anyone know how to resolve this issue?

Can anyone help me out to resolve the problem or point me in the right direction. I have done mu

 

Server Error in '/IRD' Application.


Configuration Error

             Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.            
Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.
Source Error:

Line 18:             during development.
Line 19:         -->Line 20: <compilation debug="false" targetFramework="4.0" /> Line 21:     <!--
Line 22:           The <authentication> section enables configuration 
                  

Source File: C:\inetpub\wwwroot\web.config   Line: 20            


Version Information: Microsoft .NET Framework Version:2.0.50727.5466; ASP.NET Version:2.0.50727.5456

 

 

Adding CNAME via C# code

$
0
0

Hi Team

I have a requirement to add App Domain, IIS Site via C# code and configure the site accessible via internet.

When I add a sub domain manually via 'Control Panel' (Plesk) of hosted environment, it works well.

At the time of creating from c# code, everything works (like creation of App Pool, IIS site) but it is still inaccessible from internet.

The reason I found that my code is not adding CNAME and A records to DNS.

By the term 'still inaccessible from internet' I mean to say that when I am trying to access that say I have created a sub domain SubA under my main Domain 'Domain'.

THe custom code has created the app pool, IIS site, linked App pool to IIS , also created the binding records.

Now when I am trying to access the site from my pc like http://SubA.Domain.com , browser is showing page can not be displayed.

Where as when I tried creating subdomain SubB under same domain via Plesk, i am able to access the link: http://SubB.Domain.com

The difference I found is that creating sub domain via Plesk adds the A, CNAME and other related records to DNS.

Hence looking for help in adding these records to DNS via c# app.

Can anybody help me in how to create A record, CNAME, MX records via c# so that the subdomain gets accessible via internet? Waiting for the replies..

IIS 7.5 always returns 403 when I try to access any website

$
0
0
<div class="content btf-content"> <div class="first last">I have created a test website with default.htm page that displays the text hello in the c:\inetpub\wwwroot folder on my local computer that has windows 7 Ultimate version 6.1 and IIS 7.5

The Users and IIS_IUSRS groups have been given full rights.  I have tried enable/disable annonymous authentication.  

The website uses an application pool that uses my credentials which have admin rights to my computer.  The DefaultAppPool also uses Integrated managed pipeline mode.  I have also set the physical path credentials to my account also for the website.  I have tried enabling anonymous authentication and using my account also.

I have also tried browsing the default website from within IIS.  I also get a 403 error.

The read only attribute is turn on for the c:\inetpub\wwwroot folder.  I do not know if that applies.  I have not been able to turn off the read only attribute to the c:\inetpub\wwwroot folder.  I get an access denied error.

Any ideas are greatly appreciated.</div> </div>

IIS 8.0: ASP.NET 4.0+ (4.5) in Full trust on shared webhosting?

$
0
0

I'm not sure whether to post this question here or over there @asp.net. Nowadays more and more .NET website applications are unable to function in a (modified) medium trust .NET webhosting environment. Like some Umbraco extensions, Orchard CMS (since 1.6), other CMS-s, and so on.

I read something about changes to Security and Code Access Security in 4.0+:

does this mean we no longer have to set up a (modified) medium trust configuration file on .NET 4.0+ (4.5), on Windows Server 2012 / IIS 8.0? Eventhough I would prefer to do so...

problem when browsing to my asp.net website (connection timeout)

$
0
0

hi,

i have a free url (gip.hopto.org) that browses to "my ip":6666

6666 is the port i forwarded

up till now, everything worked fine....

but now when i browse to the url i get a error in firefox and IE10

the error sais:

wait time for connection timeout

server on "my ip" took to long to answer

maybe there is anything wrong in my iis settings, i dont know

hope you guys can help me out...

greetz Quinn

ASP Trust level, web.config

$
0
0

Hi, everyone

Recently found one of our web servers had ASP NET trust level set to FULL (seems its a default). That makes it vulnerable to ASP Net shell scripts that use cmd.exe and can list all files on the web server.

I set the default for trust level to be medium in the global asp net web.config file, but some sites or apps require trust level=high, so some hacker could, if he obtained access to web.config, change the trust level...

Is there anything else I can do besides audit changed web.config files?

Thanks.

IIS7.5 Not Auto-Compiling ASP.NET Code

$
0
0

Hello,

I have a fodler structure that I am migrating to IIS7.5. I copied the folder and all it's contents to the new machine and set it as a virtual directory (which worked fine on the old machine). However, IIS7.5 will not compile the code. It is set to ASP.NET2.0. Any direction or help would be appreciated.


Thanks!

Cannot gain accces to Active Directory from IIS ASP.net application but I Can from windows app

$
0
0

I have created a new ASP.net application and I am trying to get all members of ActiveDirectory but the code I have written is causing an exception once I publish to an IIS Server. It works on my local machine and installed IIS 7.5 but it doesn't work on our server, also I wrote a windows application (for test to connect to ActiveDirectory and get all members) running on the same server that works fine therefore i sure that is an IIS problem,

I'll post the code block and the exception here:

System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.DirectoryServices.DirectoryServicesCOMException (0x80072020): An operations error occurred.

   at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
   at System.DirectoryServices.DirectoryEntry.Bind()
   at System.DirectoryServices.DirectoryEntry.get_AdsObject()
   at System.DirectoryServices.PropertyValueCollection.PopulateList()
   at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName)
   at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)
   at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInitNoContainer()
   at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit()
   at System.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
   at System.DirectoryServices.AccountManagement.PrincipalContext.ContextForType(Type t)
   at System.DirectoryServices.AccountManagement.Principal.set_SamAccountName(String value)
   at Sg.Portal.UserManagement.UI.InternalUserEdit.LoadData2(String userName) in d:\AppSrc\BuildSource\Alvand\CustomerPortalRelease\Sources\Source\Portal\UserManagement\UI\InternalUserEdit.aspx.cs:line 288
   at Sg.Portal.UserManagement.UI.InternalUserEdit.btnSelectUserName_Click(Object source, EventArgs args) in d:\AppSrc\BuildSource\Alvand\CustomerPortalRelease\Sources\Source\Portal\UserManagement\UI\InternalUserEdit.aspx.cs:line 271
   at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.usermanagement_ui_internaluseredit_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\d7bb0daf\afc65b68\App_Web_q5ivyzuq.11.cs:line 0
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

my code is:

using (var ctx = new PrincipalContext(ContextType.Domain, AuthenticationHelper.DomainName))
			{
				var q = new UserPrincipal(ctx);
				q.Enabled = true;
				if (userName != "")
				{
					q.SamAccountName = userName + "*";
				}
				var users = new PrincipalSearcher(q).FindAll().OrderBy(x => x.SamAccountName).Take(201).ToList();
				msgThereAreMoreDomainUsers.Visible = users.Count > 200;
				lvwDomainUsers.DataSource = users;
				lvwDomainUsers.DataBind();
				updDomainUsers.Update();
			}



 

Viewing all 589 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>