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

Problem running .NET 4.0 site in IIS 7.5: Missing Namespace error with web service reference...

$
0
0

I have a project that is receiving the "The type or namespace '' does not exist in the class or namespace ''" error. I've seen a lot of solutions here that haven't been able to solve my problem.

The site was downloaded via TFS and I'm using VS 2012. I've configured the site to run locally through IIS 7.5. The project build has a target framework of 4.0.

Loading the site in the browser results in your standard 500 - Internal Server Error. I've checked the Event Viewer and this is the the error along with the stack trace :

c:\inetpub\wwwroot\Jet_Distrib_US\App_Code\CSCode\WM_WebServiceHelper.cs(40): error CS0234: The type or namespace name 'WM_Get_SoldToRequest' does not exist in the namespace 'WM_JetService' (are you missing an assembly reference?) at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) at System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) at System.Web.Compilation.BuildManager.CompileCodeDirectories() at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
at System.Web.Compilation.BuildManager.CallAppInitializeMethod() at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

WM_JetService is set in the Web_References folder of the project.

As an example of one of the errors I am seeing in WM_WebServiceHelper.cs is:

using (WM_JetService.JetServiceSoapClient WMService = new WM_JetService.JetServiceSoapClient()) {

WM_JetService.WM_Get_SoldToRequest request = new WM_JetService.WM_Get_SoldToRequest(); ...

}

(I'm getting the red error indicators beneath "WM_Get_SoldToRequest").

I can create an instance of WM_JetService but for some reason, I can't reference any of it's methods or properties.

This code works fine for the client locally where it was developed. I cannot get it to run on my machine locally though. Also, when I installed VS2012, it updated my framework to 4.5. Not sure if that has anything to do with this but I've made sure that my AppPool is set to 4.0 and that the project has a targetFramework of 4.0.

Could this be a configuration issue with IIS 7.5 or with VS 2012?  Is there something else I'm supposed to do to get this web service reference to work locally??

Any help would be greatly appreciated.


Alternate registry views

$
0
0

EDIT: I think I have it figured out.  Please delete Cool

The configuration section "membership" cannot be read because it is missing a section declaration

$
0
0

I'm pretty much following the instructions at (http://msdn.microsoft.com/en-us/library/ff650307.aspx#paght000021_step1) to create a webapp with an AD login page, but I am getting the following error in IIS 7.5.

'The configuration section 'membership' cannot be read because it is missing a section declaration "

<configuration>

<system.web>
<compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
</system.web>

<connectionStrings>
<add name="AUSTXConnectionString" connectionString="LDAP://austx.ad.company.com/CN=Users,DC=austx,DC=ad,DC=company,DC=com" />
<add name="MANPHConnectionString" connectionString="LDAP://manph.ad.company.com/CN=Users,DC=austx,DC=ad,DC=company,DC=com" />
</connectionStrings>

<membership>
<providers>
<add
name="austxadmem"
type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="AUSTXConnectionString"
connectionUsername="user"
connectionPassword="password" />
<add
name="manphadmem"
type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="MANPHConnectionString"
connectionUsername="user"
connectionPassword="password" />
</providers>
</membership>
</configuration>

HTTP Error 500.23 - How do i solve this?

$
0
0

 hi guys,

i've just switched to Windows 7 RTM and installed ASP.NET and IIS

 i seem to get the error HTTP Error 500.23 - Internal Server Error

An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode

how do i solve this problem?

 

ASP.NET MVC 3 on IIS 7 (2008 R2)

$
0
0
Hopping that someone can help me out with this... I've deployed an ASP.NET MVC application to the default site and market it as an application. The DefaultAppPool has been switched to use .NET 4.0 and is integrated. The site comes up with a 403 and is a result of Directory Browsing being disabled. Interesting issue, switching the pool back to .NET 2.0, ASP tries to parse the web.config. Anyone got tips on how to resolve this issue?

programmatically Configure a Site for Delegated Non-Administrator Deployment

$
0
0

I know its possible another web hosting company does it I'm trying to figure out how to use a c# .net application to make it so that a user can use webdeploy on their site hosted on my server(s) without me having to open up IIS manager and do the delegation by hand.

 

Thank You

setting validation key

$
0
0

We are trying to solve the exact problem described in http://support.microsoft.com/kb/555353.

The article says that our servers "must have all the machineKey configurations set to the same validationKey." It goes on to say that "the key must be exactly 128 bits".

For information on how to properly construct the machineKey, I consulted http://msdn.microsoft.com/en-us/library/w8h3skw9%28v=vs.100%29.aspx. It says that "the length of the [validation] key depends on the hash algorithm that is used". The only one that is exactly 128 bits is "MD5requires a 128-bit key (32 hexadecimal characters)."

So I created machineKey like this:

<machineKey decryption="Auto" decryptionKey="AutoGenerate, IsolateApps" validation="MD5" validationKey="A129872DF42BC11F0F76E095552F55EF" />

However, our web applications stopped working. This event is generated in the Application event log:

Log Name:      Application
Source:        ASP.NET 4.0.30319.0
Event ID:      1310
Task Category: Web Event
Level:         Warning
Keywords:      Classic
Description:
Event code: 3008
Event message: A configuration error has occurred.
Event ID: 2212e9ba6591469c8486900a1313c80e
Event sequence: 2
Event occurrence: 1
Event detail code: 0
 
Exception information:
    Exception type: ConfigurationErrorsException
    Exception message: Machine validation key is invalid. It is '32' chars long. It should be either "AutoGenerate" or between 40 and 128 Hex chars long, and may be followed by ",IsolateApps". (C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config line 285)

(I edited the text of the event to be concise. If you want more, I can send it.)

So the documentation says to make the validation key 128 bits long but .NET says that is doesn't like a 32-char key. Have I misunderstood the documentation?

Regards,

Cam

Why can I only browse my web site through IIS 5.1 console manager and not through IE 7.0

$
0
0

Hi ;

I am trying to browse a page on a local machine's web site.

I can browse through the IIS 5.1 console but not through IE.

I tried http://localhost/mywebsite and cannot find file message is the result.

I added 127.0.0.1 mycomputername to the hosts file too.

Thanks for your insights !


Publishing basic ASP.Net project to IIS 7.5 on WHS 2011

$
0
0

So I’ve created a basic asp.net website (just a default VS2010 ASP.Net 4.0 project) which I want to publish to the IIS 7.5 server on my WHS2011 machine. This already has a default website you can use for remote access to the server.

I’ve added the published project as an application under the Default Website > Remote part of IIS and in the WHS 2011 Dashboard I’ve added a link pointing to this folder, so it is exposed in the Remote website as a link (which I've also done successfully with a Silverlight application)

When I try to browse to the link via my remote website or directly in the ISS Manager I get the following error:

Compiler Error Message:CS0234: The type or namespace name 'WindowsServerSolutions' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

But the error is thrown not on the web.config of my ASP.Net project, but the Windows Server RemoteAccess web.config, which is part of WHS, and unaltered by me.

I’ve had a look on the web and tried a few different things, such as make sure the Application Pools of both have the same .Net versioning but this is already the case and does not solve anything.

I have the feeling it is some sort of clash between the information provided in the config of the original website and the one I am trying to add (as a child page), but I have no ideas where to look next.

Any suggestions would be greatly appreciated!

Elco

Kill a Specific Worker Process

$
0
0

I have an applicaiton which call diffrent dll . My problem is how to kill a specific dll with out restart of IIS Server 7.0 .As the applicaiton pool will be on Windows Server so i will not have right to log in the server and restart iis . so how to kill the specific dll without log in to the server and with out restart of iis server ?

Please provide the sollution asap as the issue is so much critical.

Why does asp.net application not update from an xml data stream ?

$
0
0

Hi;

I have a SSL web site which consists of a several web handlers which are called remotely.

There are a couple of web handlers which, when receiving an XML datastream, update a database vis port 443.

This does not happen.

Each call to the web handler code with the datafeed creates an HTTP status of 200 and there are no asp.net exceptions listed.

I am able to run this application on my local machine which is set up as a web site running under IIS 5.1, it is a XP machine,

with no problems.

The difference being my local app uses an xml file instead of a live stream and I am using port 85 for my updates.

What IIS setting am I missing here ?

 Thanks for your suggestions !

 

 

  

Display domain name instead of IP

$
0
0

We have windows server 2008 R2, static IP and Domain name. In IIS Manager -> web site -> Bindings - Configured IP with domain name correctly, but the domain name is not diplaying when we enter www.mycompany.com instead static ip is displayed, what we need to do to display domain name correctly. 

Thanks,

Bala

Nuget Update error

$
0
0

I get this error package when attempting to update Nuget in Webmatrix.

An error occurred.

Updating 'NuGet.Core 1.6.2' to 'Nuget.Core 2.2.0' failed. Unable to find a version of 'Microsoft.AspNet.WebPages.Administration' that is compatible with 'Nuget.Core 2.2.0'.
System.InvalidOperationException: Updating 'NuGet.Core 1.6.2' to 'Nuget.Core 2.2.0' failed. Unable to find a version of 'Microsoft.AspNet.WebPages.Administration' that is compatible with 'Nuget.Core 2.2.0'.

I recently upgraded to Microsoft.AspNet.WebPages.Administration 2.0.20713.0.

Any help would certainly be appreciated.

Thanks.

Passing credentials through IIS 7.0

$
0
0

Hello everyone,

I'm setting up a machine to become the router in my intranet. It's running Windows Server 2008 and IIS 7.0. I'm trying to access one of the machines running Sharepoint Server (making sure it goes through the router) and I'm getting HTTP 401 error. Accessing the sharepoint machine from the router works ok but if I try the same credentials starting from a different machine and force it to go through the router, then the HTTP 401 error appears. I'm searching for a solution for this problem.

Is this the typical "double-hop issue"? Can this be solved using NTLM as authentication or is kerberos mandatory? Can anyone point me to a kb or instructions on tackling this scenario? I tried enabling "ASP.net Impersonation" in the Router, selecting auth user in the its Edit, but only got HTTP 500.24 response errors.

Also tried to add the following lines to the web.config file in the default website (as a result of a search) but only managed to end up with a invalid XML file.
<identity impersonate="true" />
<validateIntegratedModeConfiguration="false"/>
<windowsAuthentication enabled="true" useAppPoolCredentials="true"/>

More information on the machines,
Router: Windows Server 2008, IIS 7.0, Windows Authentication only; Default website with the same auth enabled. ARR + URL Module redirect/rewrite correctly.
Sharepoint: MOSS 2007, Windows Authentication and Integrated Windows Authentication; IIS 6.0 with Windows Authentication enabled.

Thanks in advance,
Nuno Cruz

Certsrv (Certificate Authority) site causing ASP.NET errors in IIS7

$
0
0

I am trying to use the online Certificate Authority service to generate a certificate.
When I browse to http://127.0.0.1/CertSrv I recive the following error message:

Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

 

This is what gets logged in the application > event viewer:

A request mapped to aspnet_isapi.dll was made within an application pool running in Integrated .NET mode.  Aspnet_isapi.dll can only be used when running in Classic .NET mode.  Please either specify preCondition="ISAPImode" on the handler mapping to make it run only in application pools running in Classic .NET mode, or move the application to another application pool running in Classic .NET mode in order to use this handler mapping.

Source: ASP.NET 4.0.30319.0
Event ID: 1324


How can I fix this?

 


The element 'buildProviders' cannot be defined below the application level.

$
0
0

I deploy my asp.net web application and  when i open the internet exploer i found this error

The element 'buildProviders' cannot be defined below the application level.

 

how i can solve this error ?

Dropdown values on our website does not load after few hours.

$
0
0
Hi Team, We have a application running on IIS 6.0 where we have created app pool explicitly for our website. Issue is there are some dropdown values which does not appear after some time. Those values appear only after resetting IIS Pool. Could you please let us know what is wrong which makes the values of dropdown disappear/could not load. Thanks in advance, Vikash

X-Forward-For giving local IP instead of remote

$
0
0

I am using EC2 Windows 2012 IIS8 server on Amazon Web Services. My EC2 is bahind Elastic Load Balancer. The real client ip is passed via the X-Forwarded-For  header.  I block the page to be visibile to me only by the IP address.

string ipAddress = HttpContext.Current.Request.Headers["X-Forwarded-For"].Split(',').FirstOrDefault‌();
        
        Response.Write(ipAddress);
        if (ipAddress != MY_IP_ADDRESS)
        {
            Response.TrySkipIisCustomErrors = true;
            Response.StatusCode = 404;
            Response.StatusDescription = "Page not found";
            Response.Flush();
        }

The issue is like that:

1) Browser the site via the EC2 browser via remote desktop, gets 404 - so far so good.

2) Browse from my local computer, gets to see the page as intended

3) Went back to the EC2 and browse the page I get to see the page - NOT AS INTENDED

The thing is that when I browse the page the second time on the EC2, the X-Forwarded-For code gives me the IP address of my local machine instead of the EC2 ip address - how can it be?! - How can it be that when I browse the site from withint the EC2 remote desktop browser I get to see my local IP address in the X-Forwarded-For system variable?

Using: Windows 2012 Server + IIS8 + Amazon Elastic Load Balaner.

Thanks in advance.

Testing Asp.net web app to nake sure working with IIS 7

$
0
0
How do I test my asp.net (4.0) web app to make sure it is working with IIS 7. Sincerely, Computergyrl

IIS 7.5 app pool domain account issue

$
0
0

I've been having problems with a dev server and I hope someone could shed some light on this.

MVC 4 .Net 4.5 app, challenge/response only, no impersonation, on an IIS 7.5 box using an AD domain service account as the app pool account targeted at that application only.

I'm trying to connect to SQL server on a separate box using the app pool account (domain\account). The account is registered in security for SQL and the relevant databases and applied to various stored procedures within those databases. Basically a standard set up that I've done a good few times before.

It just won't connect, as it keeps trying to use the machine$ account which I don't want to use. It won't even connect if I put a user id and password in the connection string and I'm now stumped. Has anyone got any pointers to solve this? Help much appreciated.

 

Edit to add: if I add use my account as the app pool identity account I get straight into the database, but of course that's not much use.

Oh.... windows identity is the app pool account (domain\account), user identity the logged requesting user

Viewing all 589 articles
Browse latest View live


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