Код: Выделить всё
GremlinClient gremlinClient;
var gremlinServer = new GremlinServer(hostname, port, enableSsl: true, username: $"/dbs/{database}/colls/{container}", password: authKey);
gremlinClient = new GremlinClient(gremlinServer);
system.aggregateException: одна или несколько ошибок. ---> System.ArgumentException: заголовок «пользователь-агент» должен быть изменен с использованием соответствующего свойства или метода.
имя параметра: имя
at system.net.webheadercollection.throwonRestrictedheader (String Headernam Gremlin.net.driver.websocketConnection..ctor (клиент IclientWebSocke, настройки WebSocketSettings) /> at system.runtime.exceptionservices.ExceptionDispatchInfo.Throw ()
at system.runtime.compilerservices.taskawaiter.handlenononSuccessAnddebuggerNotification (задача)
at gremlin.net.driver.connectionpool.d__21.movenext ()
at system.threading.tasks.task1.GetResultCore(Boolean waitCompletionNotification) at Gremlin.Net.Driver.ConnectionPool.d__21.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Gremlin.Net.Driver.ConnectionPool.d__19.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Gremlin.Net.Process.Utils.WaitUnwrap(Task task) at Gremlin.Net.Driver.GremlinClient..ctor(GremlinServer gremlinServer, IMessageSerializer messageSerializer, ConnectionPoolSettings connectionPoolSettings, Action< /code> 1 websocketCockeConfiguration, String SessionId, Boolean DisableCompression, iloggerFactory loggerFactory)
at bizagi.cloud.sites.services.openai.openaimanager.d__21.movenext ()
---> (Внутреннее исключение #0). Метод.
Имя параметра: имя
at system.net.webheadercollection.throwonRestrictedheader (String Headername)
at system.net.webheadercollection.set (name String, String value)
at gremlin.net.driver.websocketConnection..ctor (iclientwoctoctecoctecoste Client, websocketsttings) atebocketsttings) atebsocketsttings) atebsocketsttings) atebocketsttings). Gremlin.net.driver.connectionfactory.createConnection ()
at gremlin.net.driver.connectionpool.d__22.movenext ()
--- Конец трассе стека из предыдущего место System.runtime.compilerservices.taskawaiter.handlenonSuccessAnddebuggerNotification (задача)
at gremlin.net.driver.concectionpool.d__21.movenext ()
Я пытался использовать AI, чтобы помочь мне найти решение, но не сработало. Может быть, кто -нибудь знал, в чем может быть проблема и как я могу ее решить?
Спасибо
Подробнее здесь: https://stackoverflow.com/questions/795 ... ent-header