Raziya
30-04-2010, 16:17
Здравствуйте,
У меня проблемы с тем, что не могу сделать deploy на проект WebPart (называется Mektublar).
Параметры - Windows Server 2008 SP1 x64, SQL Server 2008, IIS7, MOSS 2007, Visual Studio 2008, VSeWSS 1.3,...
Вот как выглядит код:
using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
namespace Mektublar
{
[Guid("93FC9F85-9B7A-4f13-A3B5-2851044BF062")]
public class Mektublar : System.Web.UI.WebControls.WebParts.WebPart
{
Control _myControl;
String err;
public Mektublar()
{
this.ExportMode = WebPartExportMode.All;
}
protected override void Render(HtmlTextWriter writer)
{
try
{
_myControl.RenderControl(writer);
}
catch (Exception e)
{
writer.Write(e.Message + " : " + err);
}
}
protected override void CreateChildControls()
{
base.CreateChildControls();
try
{
this.Controls.Clear();
_myControl = this.Page.LoadControl("\\_layouts\\Mektub.ascx");
this.Controls.Add(_myControl);
}
catch (Exception e)
{
err = e.Message;
}
}
}
}
выдает такую ошибку:
Error 1 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: '<html>
<head>
<title>The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>
<body bgcolor="white">
<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
'. 0 0
Я нашла команду которая помогла многим в этой ситуации
%SystemRoot%\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe -i
далее run>cmd>iisreset... Даже комп перезагрузила... Но ошика не ушла. Потом я поняла что надо было сделать так:
%SystemRoot%\Microsoft.NET\Framework64\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -i
и запустила ее. Я думаю, мне сначало надо было избавиться от первой, чтоб запустить вторую, но я этого не сделала и ошибка еще на месте. Какие есть предложения??? Мне скорее надо от записанных этой командой скриптов избавиться, а потом еще раз попробовать команду
%SystemRoot%\Microsoft.NET\Framework64\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -i
Как мне удалить скрипты записанные от последних двух команд? Или что еще можно сделать?
У меня проблемы с тем, что не могу сделать deploy на проект WebPart (называется Mektublar).
Параметры - Windows Server 2008 SP1 x64, SQL Server 2008, IIS7, MOSS 2007, Visual Studio 2008, VSeWSS 1.3,...
Вот как выглядит код:
using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
namespace Mektublar
{
[Guid("93FC9F85-9B7A-4f13-A3B5-2851044BF062")]
public class Mektublar : System.Web.UI.WebControls.WebParts.WebPart
{
Control _myControl;
String err;
public Mektublar()
{
this.ExportMode = WebPartExportMode.All;
}
protected override void Render(HtmlTextWriter writer)
{
try
{
_myControl.RenderControl(writer);
}
catch (Exception e)
{
writer.Write(e.Message + " : " + err);
}
}
protected override void CreateChildControls()
{
base.CreateChildControls();
try
{
this.Controls.Clear();
_myControl = this.Page.LoadControl("\\_layouts\\Mektub.ascx");
this.Controls.Add(_myControl);
}
catch (Exception e)
{
err = e.Message;
}
}
}
}
выдает такую ошибку:
Error 1 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: '<html>
<head>
<title>The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>
<body bgcolor="white">
<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
'. 0 0
Я нашла команду которая помогла многим в этой ситуации
%SystemRoot%\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe -i
далее run>cmd>iisreset... Даже комп перезагрузила... Но ошика не ушла. Потом я поняла что надо было сделать так:
%SystemRoot%\Microsoft.NET\Framework64\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -i
и запустила ее. Я думаю, мне сначало надо было избавиться от первой, чтоб запустить вторую, но я этого не сделала и ошибка еще на месте. Какие есть предложения??? Мне скорее надо от записанных этой командой скриптов избавиться, а потом еще раз попробовать команду
%SystemRoot%\Microsoft.NET\Framework64\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -i
Как мне удалить скрипты записанные от последних двух команд? Или что еще можно сделать?