powered by simpleCommunicator - 2.0.60     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / Не могу переслать пароль SendHashed
3 сообщений из 3, страница 1 из 1
Не могу переслать пароль SendHashed
    #34098361
Kuka
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Написал простенький сервис....
Клиентом передаю UsernameToken с паролем SendHashed...
На сервисе добавил файл UNT.cs


namespace UNTM
{
    public class UNTManager : UsernameTokenManager
    {
        public UNTManager()
        { }
        protected override string AuthenticateToken(UsernameToken token)
        {
            return "1111";
        }

    }
}


В web.config добавил
<microsoft.web.services3>
<diagnostics />
<security>
<securityTokenManager>
<add type="UNTM.UNTManager,UNTM" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="wsse:UsernameToken" />
</securityTokenManager>
</security>
</microsoft.web.services3>
При сборке проекта у меня не появляется никаких dll и соответственно клиент получает от сервиса исключение что не может загрузить dll

System.Web.Services.Protocols.SoapHeaderException was unhandled
Message="System.Web.Services.Protocols.SoapHeaderException: Server unavailable, please try later ---> System.ApplicationException: WSE842: The service pipeline could not be created. ---> System.Configuration.ConfigurationErrorsException: WSE032: There was an error loading the microsoft.web.services3 configuration section. ---> System.Configuration.ConfigurationErrorsException: WSE040: Type UNTM.UNTManager,UNTM could not be loaded. Please check the configuration file. (E:\\Net\\WebServices\\EncryptWseCS\\EncryptWseSvcCS\\web.config line 38)\r\n at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)\r\n at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)\r\n at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)\r\n at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)\r\n at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)\r\n at System.Web.HttpContext.GetSection(String sectionName)\r\n at Microsoft.Web.Services3.Configuration.WebServicesConfiguration.get_Current()\r\n --- End of inner exception stack trace ---\r\n at Microsoft.Web.Services3.Configuration.WebServicesConfiguration.get_Current()\r\n at Microsoft.Web.Services3.Configuration.WebServicesConfiguration.get_MessagingConfiguration()\r\n at Microsoft.Web.Services3.WseProtocol.ModifyInitializedExtensions(PriorityGroup group, SoapExtension[] extensions)\r\n at System.Web.Services.Protocols.SoapServerProtocol.Initialize()\r\n --- End of inner exception stack trace ---\r\n --- End of inner exception stack trace ---"
Source="System.Web.Services"
Actor="http://localhost/EncryptWseSvcCS/Service1.asmx"
Lang=""
Node="http://localhost/EncryptWseSvcCS/Service1.asmx"
Role=""
StackTrace:
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at EncryptWseClientCS.localhost.Service1Wse.GetTime(Boolean ShowSeconds)
at EncryptWseClientCS.Form1.button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at EncryptWseClientCS.Form1.Main()
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

Чего я не доделываю?
...
Рейтинг: 0 / 0
Не могу переслать пароль SendHashed
    #34098544
Kuka
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Хорошо.....
Создал отдельную class Library
там нарисовал
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Web.Services3;
using Microsoft.Web.Services3.Security;
using Microsoft.Web.Services3.Security.Tokens;



namespace MyUsernameTokenManager
{
    public class myUserNameTokenManager : UsernameTokenManager
    {
        protected override string AuthenticateToken(UsernameToken token)
        {
            return "111";
        }
    }
}
Добавил в проект сервиса ссылку..... Хорошо dll появились в каталоге binВ web.config сервиса пишу
 <securityTokenManager>
        <add type="" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" localName="UsernameToken" />
      </securityTokenManager>


И все равно получаю ту же ошибку, что в web confige ошибка и не мгу загрузить MyUsernameTokenManager.myUsernameTokenManager,MyUsernameTokenManager
Что ж такое та?
...
Рейтинг: 0 / 0
Не могу переслать пароль SendHashed
    #34126168
Kuka
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Нашел в нете подобную проблему
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=775987&SiteId=1

Поместил все сборки, прописанные в web.config <assemblies> в каталог PrivateAssemblies.
Все равно не помогает.... таже ошибка
Да что за демон в моем компе поселился?
Блин! Ну как сказать разобрался.....
Снес WSE и проект, почистил PrivateAssemblies от творений своих.... установил заново....
Сделал заново проект......
И все заработало......
...
Рейтинг: 0 / 0
3 сообщений из 3, страница 1 из 1
Форумы / ASP.NET [игнор отключен] [закрыт для гостей] / Не могу переслать пароль SendHashed
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]