So I have an ebay import routine as part of a windows application I wrote a few years ago. It works well but I am thinking of converting this to an Azure Function App which will run every 2 weeks at a scheduled time.
The original win app is written in C# so I am sticking with that. The app compiles and starts but then I hit a problem. I user the same eBayToken (context.ApiCredential.eBayToken) which works fine in the win app.
So when I run the Function App in debug mode in VS I see this.
Functions:
ebayPort: [GET,POST] http://localhost:7186/api/ebayPort [2025-08-04T20:01:52.815Z] Host lock lease acquired by instance ID '0000000000000000000000007A365188'.
I then place the localhost address into Chrome I see this.
So if then I step thru this code in debug mode
ApiContext context = new();
//set the User token
context.ApiCredential.eBayToken = "??????????????????????????????????????";
//set the server url
context.SoapApiServerUrl = "https://api.ebay.com/wsapi";
//enable logging
context.ApiLogManager = new ApiLogManager();
context.ApiLogManager.ApiLoggerList.Add(new FileLogger("log.txt", true, true, true));
context.ApiLogManager.EnableLogging = true;
context.Site = SiteCodeType.UK;
DateTime CreateTimeFromPrev, CreateTimeFrom, CreateTimeTo;
GetOrdersCall getOrders = new(context)
{
DetailLevelList = []
};
Then I look at the output
For detailed output, run func with --verbose flag.
[2025-08-04T20:04:41.312Z] Host lock lease acquired by instance ID '?????????????????.
[2025-08-04T20:04:54.309Z] Executing 'Functions.ebayPort' (Reason='This function was programmatically called via the host APIs.', Id=????????????????????)
[2025-08-04T20:05:13.859Z] Function 'ebayPort', Invocation id '02711137-45bb-4732-9a23-679094f81b63': An exception was thrown by the invocation.
[2025-08-04T20:05:13.860Z] Result: Function 'ebayPort', Invocation id '02711137-45bb-4732-9a23-679094f81b63': An exception was thrown by the invocation.
Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
[2025-08-04T20:05:13.861Z] File name: 'System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
So the app is looking for 'System.Web.Services’. Has anyone got any useful suggestions on how to get this working or any useful links or sample code please.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4