'프로그래밍/.NET Framework'에 해당되는 글 2건

  1. 2012.12.15 [ASP.NET] targetFramework error (windows XP / IIS)
  2. 2008.04.26 ProcessStartInfo 클래스 - 프로세서 리턴 값 받기

Windows XP에 IIS을 설치한 후 sample sorce을 Virtual drectory에 넣었다.

하지만, Configuration Error 에러 메시지가 나오는 현상이다.

Server Error in '/test' 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 22: 			</controls>
Line 23: 		</pages>
Line 24: 		<compilation debug="true" targetFramework="4.0">
Line 25: 			<assemblies>
Line 26: 				<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Source File: H:\700.project 2012\testweb\web.config    Line: 24


Version Information: Microsoft .NET Framework Version:2.0.50727.3625; ASP.NET Version:2.0.50727.3634


문제는 다름 아닌 아래쪽 메시지에서 찾을 수 있었다.


Version Information: Microsoft .NET Framework Version:2.0.50727.3625; ASP.NET Version:2.0.50727.3634

구글에서 검색한 결과 다들 .NET 버전을 확인하라고 하는데....

처음엔 무슨 말인지 몰랐다.

그런데 IIS에서 ASP.NET 탭을 본 기억이 나서 확인 한 결과....

( IIS >  Right click on WebSite > Properties > ASP.NET > Version )



ASP.NET 버전은 4.0 으로 변경하면 정상적으로 보인다.

이것을 몰라서 그동안 완전 고생했었다..ㅡㅡ;;


.

Posted by 노을지기
ProcessStartInfo 클래스

프로세스를 시작할 때 사용하는 값 집합을 지정합니다.

네임스페이스: System.Diagnostics
어셈블리: System(system.dll)

Visual Basic(선언)
Public NotInheritable Class ProcessStartInfo
Visual Basic(사용법)
Dim instance As ProcessStartInfo
C#
public sealed class ProcessStartInfo
C++
public ref class ProcessStartInfo sealed
J#
public final class ProcessStartInfo
JScript
public final class ProcessStartInfo
Note참고

이 클래스에 적용되는 HostProtectionAttribute 특성의 Resources 속성 값은 SharedState | SelfAffectingProcessMgmt입니다. HostProtectionAttribute는 대개 아이콘을 두 번 클릭하거나, 명령을 입력하거나, 브라우저에서 URL을 입력하여 시작되는 데스크톱 응용 프로그램에 영향을 미치지 않습니다. 자세한 내용은 HostProtectionAttribute 클래스나 SQL Server 프로그래밍 및 호스트 보호 특성을 참조하십시오.

ProcessStartInfoProcess 구성 요소와 함께 사용됩니다. Process 클래스를 사용하여 프로세스를 시작하면 실행 프로세스에 연결할 때 사용할 수 있는 정보뿐 아니라 프로세스 정보에도 액세스할 수 있습니다.

시작한 프로세스를 자세히 제어하기 위해 ProcessStartInfo 클래스를 사용할 수 있습니다. 사용자는 적어도 생성자를 사용하거나 수동으로 FileName 속성을 설정해야 합니다. 파일 이름은 임의의 응용 프로그램 또는 문서입니다. 여기서 문서는 열기 동작 또는 기본 동작과 관련된 파일 형식으로 정의됩니다. 운영 체제에서 사용할 수 있는 폴더 옵션 대화 상자를 사용하여 컴퓨터의 등록 파일 형식과 관련 응용 프로그램을 볼 수 있습니다. 고급 단추를 누르면 특정 등록 파일 형식과 관련된 열린 작업이 있는지 여부를 보여 주는 대화 상자가 나타납니다.

또한 해당 파일을 사용하여 수행할 작업을 정의하는 다른 속성을 설정할 수 있습니다. Verb 속성에 대해 FileName 속성의 형식에 해당하는 값을 지정할 수 있습니다. 예를 들어, 문서 형식에 대해 "인쇄"를 지정할 수 있습니다. 뿐만 아니라 Arguments 속성 값이 파일의 열린 프로시저에 전달할 명령줄 인수가 되도록 지정할 수 있습니다. 예를 들어, FileName 속성에 텍스트 편집기 응용 프로그램을 지정하면 Arguments 속성을 사용하여 편집기가 열 텍스트 파일을 지정할 수 있습니다.

표준 입력은 대개 키보드이고, 표준 출력과 표준 오류는 대개 모니터 화면입니다. 그러나 RedirectStandardInput, RedirectStandardOutputRedirectStandardError 속성을 사용하여 프로세스가 파일이나 기타 장치에서 입력을 받거나 출력을 반환하도록 할 수 있습니다. Process 구성 요소에서 StandardInput, StandardOutput 또는 StandardError 속성을 사용할 경우 우선 ProcessStartInfo 속성에 해당 값을 설정해야 합니다. 그렇지 않으면 스트림을 읽거나 쓸 때 예외가 throw됩니다.

UseShellExecute를 설정하여 운영 체제 셸을 사용하여 프로세스를 시작할 것인지 여부를 지정합니다.

프로세스가 시작될 때까지는 ProcessStartInfo 속성의 값을 변경할 수 있습니다. 프로세스를 시작한 다음에는 이러한 값을 변경해도 효과가 없습니다.

Note참고

이 클래스에는 모든 멤버에 적용되는 클래스 수준의 링크 요청이 포함되어 있습니다. 직접 실행 호출자에게 완전 신뢰 권한이 없으면 SecurityException이 throw됩니다. 보안 요청에 대한 자세한 내용은 링크 요청을 참조하십시오.

Visual Basic
Imports System
Imports System.Diagnostics
Imports System.ComponentModel


Namespace MyProcessSample
    _
   '/ <summary>
   '/ Shell for the sample.
   '/ </summary>
   Class MyProcess 
      '/ <summary>
      '/ Opens the Internet Explorer application.
      '/ </summary>
      Public Sub OpenApplication(myFavoritesPath As String)
         ' Start Internet Explorer. Defaults to the home page.
         Process.Start("IExplore.exe")
         
         ' Display the contents of the favorites folder in the browser.
         Process.Start(myFavoritesPath)
      End Sub 'OpenApplication
       
      
      '/ <summary>
      '/ Opens urls and .html documents using Internet Explorer.
      '/ </summary>
      Sub OpenWithArguments()
         ' url's are not considered documents. They can only be opened
         ' by passing them as arguments.
         Process.Start("IExplore.exe", "www.northwindtraders.com")
         
         ' Start a Web page using a browser associated with .html and .asp files.
         Process.Start("IExplore.exe", "C:\myPath\myFile.htm")
         Process.Start("IExplore.exe", "C:\myPath\myFile.asp")
      End Sub 'OpenWithArguments
      
      
      '/ <summary>
      '/ Uses the ProcessStartInfo class to start new processes, both in a minimized 
      '/ mode.
      '/ </summary>
      Sub OpenWithStartInfo()
         
         Dim startInfo As New ProcessStartInfo("IExplore.exe")
         startInfo.WindowStyle = ProcessWindowStyle.Minimized
         
         Process.Start(startInfo)
         
         startInfo.Arguments = "www.northwindtraders.com"
         
         Process.Start(startInfo)
      End Sub 'OpenWithStartInfo
       
      
      Shared Sub Main()
         ' Get the path that stores favorite links.
         Dim myFavoritesPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Favorites)
         
         Dim myProcess As New MyProcess()
         
         myProcess.OpenApplication(myFavoritesPath)
         myProcess.OpenWithArguments()
         myProcess.OpenWithStartInfo()
      End Sub 'Main 
   End Class 'MyProcess
End Namespace 'MyProcessSample
using System;
using System.Diagnostics;
using System.ComponentModel;

namespace MyProcessSample
{
    /// <summary>
    /// Shell for the sample.
    /// </summary>
    class MyProcess
    {
       
        /// <summary>
        /// Opens the Internet Explorer application.
        /// </summary>
        void OpenApplication(string myFavoritesPath)
        {
            // Start Internet Explorer. Defaults to the home page.
            Process.Start("IExplore.exe");
                    
            // Display the contents of the favorites folder in the browser.
            Process.Start(myFavoritesPath);
 
        }
        
        /// <summary>
        /// Opens urls and .html documents using Internet Explorer.
        /// </summary>
        void OpenWithArguments()
        {
            // url's are not considered documents. They can only be opened
            // by passing them as arguments.
            Process.Start("IExplore.exe", "www.northwindtraders.com");
            
            // Start a Web page using a browser associated with .html and .asp files.
            Process.Start("IExplore.exe", "C:\\myPath\\myFile.htm");
            Process.Start("IExplore.exe", "C:\\myPath\\myFile.asp");
        }
        
        /// <summary>
        /// Uses the ProcessStartInfo class to start new processes, both in a minimized 
        /// mode.
        /// </summary>
        void OpenWithStartInfo()
        {
            
            ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
            startInfo.WindowStyle = ProcessWindowStyle.Minimized;
            
            Process.Start(startInfo);
            
            startInfo.Arguments = "www.northwindtraders.com";
            
            Process.Start(startInfo);
            
        }

        static void Main()
        {
                    // Get the path that stores favorite links.
                    string myFavoritesPath = 
                    Environment.GetFolderPath(Environment.SpecialFolder.Favorites);
                
                    MyProcess myProcess = new MyProcess();
         
            myProcess.OpenApplication(myFavoritesPath);
            myProcess.OpenWithArguments();
            myProcess.OpenWithStartInfo();

               }    
    }
}
#using <System.dll>

using namespace System;
using namespace System::Diagnostics;
using namespace System::ComponentModel;

/// <summary>
/// Opens the Internet Explorer application.
/// </summary>
void OpenApplication( String^ myFavoritesPath )
{
   
   // Start Internet Explorer. Defaults to the home page.
   Process::Start( "IExplore.exe" );
   
   // Display the contents of the favorites folder in the browser.
   Process::Start( myFavoritesPath );
}


/// <summary>
/// Opens urls and .html documents using Internet Explorer.
/// </summary>
void OpenWithArguments()
{
   
   // url's are not considered documents. They can only be opened
   // by passing them as arguments.
   Process::Start( "IExplore.exe", "www.northwindtraders.com" );
   
   // Start a Web page using a browser associated with .html and .asp files.
   Process::Start( "IExplore.exe", "C:\\myPath\\myFile.htm" );
   Process::Start( "IExplore.exe", "C:\\myPath\\myFile.asp" );
}


/// <summary>
/// Uses the ProcessStartInfo class to start new processes, both in a minimized 
/// mode.
/// </summary>
void OpenWithStartInfo()
{
   ProcessStartInfo^ startInfo = gcnew ProcessStartInfo( "IExplore.exe" );
   startInfo->WindowStyle = ProcessWindowStyle::Minimized;
   Process::Start( startInfo );
   startInfo->Arguments = "www.northwindtraders.com";
   Process::Start( startInfo );
}

int main()
{
   
   // Get the path that stores favorite links.
   String^ myFavoritesPath = Environment::GetFolderPath( Environment::SpecialFolder::Favorites );
   OpenApplication( myFavoritesPath );
   OpenWithArguments();
   OpenWithStartInfo();
}

System.Object
  System.Diagnostics.ProcessStartInfo
이 형식의 모든 public static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

.NET Framework

2.0, 1.1, 1.0에서 지원

.NET Compact Framework

2.0에서 지원
Posted by 노을지기
이전버튼 1 이전버튼