ホーム » 2010 » 1月

月別アーカイブ: 1月 2010

2010年1月
 12
3456789
10111213141516
17181920212223
24252627282930
31  

カテゴリー

アーカイブ

ブログ統計情報

  • 80,348 アクセス



“Web サーバーでデバッグを開始できません”

プロジェクトを実行しようとしているときにエラーが発生しました :Web サーバーでデバッグを開始できません。 
次回からこのプロジェクトの ASP.NET ページのデバッグを無効にしますか?

[PRB] ASP.NET Web アプリケーションをデバッグできない
http://support.microsoft.com/kb/318465/
[INFO] Visual Studio .NET で ASP.NET アプリケーションをデバッグするときの一般的なエラー
http://support.microsoft.com/kb/306172/ja

[PRB] ASP.NET アプリケーションのデバッグ時にエラー メッセージ "Web サーバーでデバッグを開始できません" が表示される
http://support.microsoft.com/kb/306165/

 
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

ディレクトリにコピーできません

—— ビルド開始 : プロジェクト : Sample1, 構成 : Debug .NET ——
リソースを準備しています…
参照を更新しています…
メイン コンパイルを実行しています…
サテライト アセンブリをビルドしています…
ファイル ‘binSample1.dll’ を実行ディレクトリにコピーできません。要求された操作はユーザー マップ セクションで開いたファイルでは実行できません。
一時ファイルを出力ディレクトリにコピーできませんでした。
———————- 終了 ———————-
    ビルド : 0 正常終了、1 失敗、0 スキップ

開いている Sample1.dll を閉じる.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

“IIS メタベースにアクセスできませんでした”

‘/…/WebSite1’ アプリケーションでサーバー エラーが発生しました。


IIS メタベースにアクセスできませんでした。
説明: 現在の Web 要求を実行中に、ハンドルされていない例外が発生しました。
エラーに関する詳細および例外の発生場所については、スタック トレースを参照してください。
例外の詳細: System.Web.Hosting.HostingEnvironmentException: IIS メタベースにアクセスできませんでした。
ASP.NET を実行するのに使用されるプロセス アカウントには IIS メタベース (例: IIS://サーバー名/W3SVC) への読み取りアクセスが必要です。
メタベースのアクセス許可の変更に関する詳細は、
http://support.microsoft.com/?kbid=267904 を参照してください。

C:WindowsMicrosoft.NETFrameworkv2.0.50727aspnet_regiis.exe -u
C:WindowsMicrosoft.NETFrameworkv2.0.50727aspnet_regiis.exe -i

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

“構成にエラーがあります”

‘/Xxxx’ アプリケーションでサーバー エラーが発生しました。


構成にエラーがあります。
説明 : この要求を処理するために必要な構成ファイルの処理中にエラーが発生しました。
以下のエラーの詳細を確認し、構成ファイルに変更を加えてください。
解析エラー メッセージ:
アプリケーション レベルを超えて allowDefinition=’MachineToApplication’ として登録されているセクションを使うことはできません。
このエラーは、仮想ディレクトリが IIS でアプリケーションとして構成されなかった場合に発生します。


 IIS のアプリケーション名を登録する 

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

“XML ページを表示できません”

XML ページを表示できません
XSL スタイル シートを使用した XML 入力は表示できません。
エラーを訂正してください。[更新] ボタンをクリックするか、または後でやり直してください。


無効な文字で名前が始まりました。リソース ‘http://localhost/…/WebForm1.aspx’ の実行エラーです。ライン 1、位置 2
<%@ Page Language=”vb” AutoEventWireup=”false” Codebehind=”WebForm1.aspx.vb” Inherits=”Sample1.WebForm1″%>
-^


C:WINDOWSMicrosoft.NETFrameworkv1.1.4322aspnet_regiis -i

http://support.microsoft.com/kb/816782/ja
http://msdn.microsoft.com/ja-jp/library/k6h9cz8h(VS.80).aspx
 
http://msdn.microsoft.com/ja-jp/kb/kb00306005.aspx
http://support.microsoft.com/kb/306005/ja
 

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

Disable にされたラジオボタンでアサート

Disable にされたラジオボタンで,そのボタンが選択状態(値がそのボタン)の時,DDX を使用していると Debug 版でアサートされる.
Release 版では,うまく動作する様に見える場合もあるが,他の値に変更されない場合もある.
UpdateData(FALSE) のみを使用している場合は OK.
//*******************************************************************************
// 関数名 :指定されたコントロールの無効化
// 作成日 :’09/11/11
// 変更日 :’10/01/26 ラジオボタンで選択されている時,アサートされたバグの対応
//*******************************************************************************
inline
BOOL MDlgMod::DisableControlID (CWnd* wnd,const CUIntArray& disCmmdIDs,const BOOL isDisable)
{
    BOOL isEnable = (isDisable) ? FALSE : TRUE ;
    if (wnd == NULL)   { return FALSE ;  }
    for (INT_PTR index=0 ; index<disCmmdIDs.GetSize() ; index++) {
        UINT id = disCmmdIDs[index] ;
        if (id == 0)  { continue ; }
        CWnd* ctrl = wnd->GetDlgItem(id) ;
        if (ctrl == NULL) { continue ; }
        if (!isEnable) {
            if (_AfxIsRadioButton(ctrl->GetSafeHwnd())) {     // CtlPPG.cpp
                if (Button_GetCheck(ctrl->GetSafeHwnd())) {  // WindowsX.h
                    continue ;
                    }
                }
            }
        ctrl->EnableWindow(isEnable) ;
        }
    return TRUE ;
    }
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

コントロールがラジオボタンかどうかの判断

// CtlPPG.cpp より
BOOL AFXAPI _AfxIsRadioButton(HWND hWnd)
{
    DWORD dwButtonStyle = GetWindowLong(hWnd, GWL_STYLE) & 0x0000000FL;
    return ((dwButtonStyle == BS_RADIOBUTTON) ||
               (dwButtonStyle == BS_AUTORADIOBUTTON));
 }
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

スクリプトの制限時間の変更

Active Server Pages, ASP 0113 (0x80004005)
スクリプトを実行する時間の制限を超えました。

この制限時間は、プロパティ Server.ScriptTimeout に新しい値を指定するか、IIS 管理ツールの値を変更することによって変更できます。


Active Server Pages (ASP) のスクリプト タイムアウト エラー
http://support.microsoft.com/kb/268364/ja
WinXP IIS 管理ツール


2019/12/19 Win10 環境の IIS

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

ショートカットなど

メッセージボックスの内容をクリップボードへ 「Ctrl」+「C」  
exe の起動 Windows 7 タスクバー上の「MButton」  
IE 8 ?の翻訳 「右クリック」-「...で翻訳」  
AutoRun を機能させない 「左Shift」+USB メモリ挿入   2010/02/02 追加  
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

XP Mode のインストール関係

PC が Windows XP Mode を実行できることを確認する方法 
http://www.microsoft.com/japan/windows/virtual-pc/support/configure-bios.aspx

×-仮想化機能なし 
-BIOS設定が必要 
-そのままで可能 

2010/05/20 追記
2010/03/20 以降,「仮想化テクノロジー」は必須ではなくなった.

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

Windows Sysinternals

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

VS 6 の SP の確認

VS 6 の SP の確認
http://support.microsoft.com/kb/316915/ja
https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/316915
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\6.0\ServicePacks

Ver.   SP MFC MSC
VS 6 VC 6 6 0x0600 1200
VS .net VC 7 1 0x0700 1300
VS 2003 VC 7.1 1 0x0710 1310
VS 2005 VC 8 1 0x0800 1400
VS 2008 VC 9 1 0x0900 1500
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

IE8 での User Agent 文字列

IE8 での User Agent 文字列
 
イントラネット内で「互換表示」が ON になっていることがある.
「ツール」-「互換表示設定」-「互換表示でイントラネット…」のチェック
 
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

Excel 2007 ダブルクリックで開かない

Excel 2007
xls のダブルクリックで開かない.
 
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

ダイアログにドロップ機能の追加

「ダイアログ プロパティ」-「拡張スタイル」タブ内の「ドラッグアンドドロップを許可」にチェック.
「MFC ClassWizard」の「クラス情報」-「詳細設定オプション」の「メッセージフィルタ」を「ウィンドウ」に.
「メッセージマップ」の「メッセージ」内の WM_DROPFILES を追加.


void C???Dlg::OnDropFiles(HDROP hDropInfo) 
{
    CStringArray dropFiles ;
    ::DropFilesToStringArray(hDropInfo,dropFiles) ;
    ...
    CDialog::OnDropFiles(hDropInfo);
}
//   WinMFC.hxx
//*******************************************************************************
// 関数名 :ドロップされたファイル名の取得
// 作成日 :’07/10/19
//*******************************************************************************
BOOL DropFilesToStringArray (HDROP hDropInfo,CStringArray& strAry)
{
    UINT nFiles = ::DragQueryFile(hDropInfo,(UINT)-1,NULL,0) ;
    CStringArray dropFiles ;
    for (UINT index=0 ; index<nFiles ; index++) {
         UINT len = ::DragQueryFile(hDropInfo,index, NULL,0) ;
              len += 1 ; // 終端の NULL 文字の分を確保
         CString dropFile ;
         ::DragQueryFile(hDropInfo,index,dropFile.GetBuffer(len),len) ;
         dropFile.ReleaseBuffer() ;
         dropFiles.Add(dropFile) ;
         }
    strAry.Copy(dropFiles) ;
    return TRUE ;
    }

2014/06/02 v_tstring DropFilesTo (HDROP hDropInfo) { v_tstring dropFiles ; UINT nFiles = ::DragQueryFile(hDropInfo,(UINT)-1,NULL,0) ; for (UINT index=0 ; index<nFiles ; index++) { UINT len = ::DragQueryFile(hDropInfo,index, NULL,0) ; len += 1 ; // reserve last '\0' tstring dropFile ; dropFile.resize(len,0) ; ::DragQueryFile(hDropInfo,index,&dropFile[0],len) ; dropFiles.push_back(dropFile.c_str()) ; } return dropFiles ; }
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

IIS 環境の設定

2018/11/16 追記
 Win7 x86 に IIS
 IIS 環境の再設定
 PAtoMHD.AsPln2D を …
 RegSvr32 で ocx などの登録
 


以下は Win XP 相当の内容です.

  1. http://support.microsoft.com/?id=883607
  2. 他の環境と同様に,asp などを Inetpubwwwroot 以下にコピー.
  3. db をコピー.
  4. 「ODBC データ ソース アドミニストレータ」の「システム DSN」で追加.
  5. http://support.microsoft.com/kb/175168/ja
  6. 「コンポーネント サービス」-「DCOM の構成」で「セキュリティ」タブ内の設定.
  7. INI のアクセス権の設定. ??
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

IIS XP へのインストール

「Windows コンポーネントの追加と削除」より,IIS を追加.
 
Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

SCREnc スクリプト エンコーダ

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

複数のツールバーを横に並べて作成

//*******************************************************************************
// 関数名 :ツールバーの作成の後処理
// 作成日 :’05/06/16
// 変更日 :’07/04/06
//*******************************************************************************
// MFC\General\DockTool\MainFrm.cpp DockControlBarLeftOf より
BOOL	ToolBar::CreateDocking	(
	CFrameWnd*	frameW,
	CToolBar*	toolBar,
	UINT		idr,
	CString		title,
	UINT		barID,
	CToolBar*	last,
	const	BOOL	canFloat		//	フローティング可能かどうか
	)
{
	toolBar->SetWindowText(title) ;                                            	//  ウィンドウタイトルの設定
//	toolBar->SetBarStyle(toolBar->GetBarStyle()|CBRS_TOOLTIPS|CBRS_FLYBY) ;  	//  ツール チップなどの付加
	toolBar->EnableDocking(CBRS_ALIGN_ANY) ;                                       	//  ドッキング可能に
	Resize(toolBar,idr) ;	//	ツールバーのリサイズ
	{	//	ツールバーの位置を決定する
		static	CToolBar*		LastToolBar = NULL ;			//  前のツールバーの位置
		if (last != NULL)	{	LastToolBar = last ;	}		//  前のツールバーが指定された
		if (LastToolBar == NULL || barID != 0) {
			CControlBar*	pDockBar = frameW->GetControlBar(barID) ;
			if (pDockBar != NULL && canFloat) {
				frameW->DockControlBar(toolBar,barID) ;
				}
			}
		else {
			frameW->RecalcLayout() ;
			CRect		rect ;
			LastToolBar->GetWindowRect(&rect);
			rect.OffsetRect(1,1);
			DWORD		dw = LastToolBar->GetBarStyle();
			UINT		tBarID = 0 ;
			tBarID = (dw&CBRS_ALIGN_TOP)	            	?  AFX_IDW_DOCKBAR_TOP    : tBarID ;
			tBarID = (dw&CBRS_ALIGN_BOTTOM	&& tBarID==0)	?  AFX_IDW_DOCKBAR_BOTTOM : tBarID ;
			tBarID = (dw&CBRS_ALIGN_LEFT	&& tBarID==0)	?  AFX_IDW_DOCKBAR_LEFT   : tBarID ;
			tBarID = (dw&CBRS_ALIGN_RIGHT	&& tBarID==0)	?  AFX_IDW_DOCKBAR_RIGHT  : tBarID ;
			CControlBar*	pDockBar = frameW->GetControlBar(tBarID) ;
			if (pDockBar != NULL && canFloat) {
				frameW->DockControlBar(toolBar,tBarID,&rect) ;
				}
			}
		LastToolBar = toolBar ;				//  次のツールバーの位置を求めるために保存しておく
		}
	return	TRUE ;
	}

http://cid-535f5973454c1292.skydrive.live.com/embedicon.aspx/.Public/MFC/ToolBar.hxx
ToolBar.hxx


ToolBar.hxx

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

CMenu::SetDefaultItem()

CMenu::SetDefaultItem() では,サブメニューに設定できない

CMenu menu ;
CMenu* pPopup = menu.GetSubMenu(0);
pPopup->SetDefaultItem(defaultID) ;

pPopup->TrackPopupMenu(flags,point.x,point.y,AfxGetMainWnd()) ;

上のコードでは,トップレベルのコマンドには可能だが,そのサブメニューには対応できない.
以下の様に順に辿っていく必要がある

//*******************************************************************************
// 関数名 :既定のメニューの設定
// 作成日 :’09/11/12
//*******************************************************************************

inline BOOL MenuMod::SetDefaultItem (CMenu* menu,const UINT defaultID)
{
 if (menu == NULL)   { return FALSE ;  }
 int  menuCount = menu->GetMenuItemCount() ;
 for (int index=menuCount-1 ; 0<=index ; index–) {
  UINT menuItemID = menu->GetMenuItemID(index) ;
  if (ID_SEPARATOR    ==menuItemID)  { continue ; } // SEPARATOR
  if (menuItemID == defaultID) {
   return menu->SetDefaultItem(index,TRUE) ;
   }
  CMenu* subMenu = menu->GetSubMenu(index) ;
  if (subMenu != NULL) {
   MenuMod::SetDefaultItem(subMenu,defaultID) ;
   }
  }
 return FALSE ;
 }

MenuMod.hxx

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.