Comments (11)
Thank you for trying out the template. I can see that the error you are getting is related to your application configuration. What version of .NET core you are using? Note that the latest version of the template uses .NET Core 3.1.
I would recommend you to post your issue at tech forums such as stackoverflow or forums.asp.net as well.
from apiboilerplate.
What happen if you run using Kestrel and not IIS Express? Also how do you connect to your database? have you tried creating a database using localdb? Can you show your appsettings.json file?
from apiboilerplate.
I am using netcoreapp3.1,
I was able to run the template successfully by following these instructions.
from apiboilerplate.
But i think that the Web.config file should preexist in the template so that any one else should not have to face this problem.
from apiboilerplate.
the template should work fine without that configuration. I have tested it. I'm assuming it has something to do with IIS config. Check this out: https://stackoverflow.com/questions/54727477/http-error-500-24-internal-server-error-system-web-identityimpersonate-is-s/60340688#60340688
Also have you also tried running it in Kestrel instead of IIS Express?
from apiboilerplate.
I did not published the website. i only created the project and than clicked run (hit F5) and the above error popped up. (I did have installed the iis on my laptop but i think that it has nothing to do with the visual studio and iis express )
from apiboilerplate.
I tried the steps in this post but they did not helped me.
from apiboilerplate.
I have not changed the default settings for server and by default it is iis express(i guess).
I have not tried the localdb
I have installed sql server and i updated the appsettings.json file by changing the connection string.
following is my appsettings.json file ( I only changed the SQLDBConnectionString )
{
"ConnectionStrings": {
"SQLDBConnectionString": "Data Source=.;Initial Catalog=tmp;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
"PostgreSQLConnectionString": ""
},
"AllowedHosts": "*",
"Self": {
"Id": "api.boilerplate.core",
"Secret": "0a2e472b-f263-43fd-8372-3b13f5acf222"
},
"ApiResourceBaseUrls": {
"AuthServer": "https://localhost:5000",
"SampleApi": "https://localhost:4500"
},
"HttpClientPolicies": {
"RetryCount": 3,
"RetryDelayInMs": 500,
"RetryTimeoutInSeconds": 5,
"BreakDurationInSeconds": 30,
"MaxAttemptBeforeBreak": 3,
"HandlerTimeoutInMinutes": 5
},
"IpRateLimiting": {
"EnableEndpointRateLimiting": true,
"StackBlockedRequests": false,
"RealIpHeader": "X-Real-IP",
"ClientIdHeader": "X-ClientId",
"HttpStatusCode": 429,
"GeneralRules": [
{
"Endpoint": "*:/api/*",
"Period": "1s",
"Limit": 2
}
]
},
"HealthChecksUI": {
"HealthChecks": [
{
"Name": "HTTP-Api-Basic",
"Uri": "https://localhost:5001/selfcheck"
}
],
"Webhooks": [
{
"Name": "",
"Uri": "",
"Payload": "",
"RestoredPayload": ""
}
],
"EvaluationTimeInSeconds": 10,
"MinimumSecondsBetweenFailureNotifications": 60,
"HealthCheckDatabaseConnectionString": "Data Source=Infrastructure\\HealthChecks\\Db\\healthchecksdb"
}
}
from apiboilerplate.
It really doesn't make sense to me to use web.config for .NET Core apps. Can you try the following connectionString?
"ConnectionStrings": {
"SQLDBConnectionString": "Server=<YOUR SQL SERVER NAME>;Database=<YOUR DATABASE NAME>;Trusted_Connection=True;"
}
Also, I don't think the issue is directly related to this template. Have you tried creating a new ASP.NET Core API project without using this template and connect to your SQL Server instance? Try that and see if you can connect outside localdb.
from apiboilerplate.
i am using appsettings.json file shared above for connection string.
"ConnectionStrings": {
"SQLDBConnectionString": "Data Source=.;Initial Catalog=tmp;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
"PostgreSQLConnectionString": ""
},
I am not using web.config for connection string.
from apiboilerplate.
Yes and you are getting error with that right? The example connectionstring from the template uses localdb and you are not. The web.config settings that fixed your error is what I'm referring to and I'm not suggesting to use web.config for connectionString.
from apiboilerplate.
Related Issues (20)
- Can we add support for JWT Auth scheme and related configuration with Authroization Role, Police, permisssion etc HOT 3
- Use Middleware instead of DelegatingHandlers HOT 1
- Swagger authorization not working (401 error) HOT 3
- Trying to upgrade Nuget packages to latest version seem to break HealthChecks HOT 5
- Suggestion for new version HOT 9
- IdentityServer: Is't into this template? HOT 3
- How to use AuthServerConnect class? HOT 1
- HealthChecksUI not start HOT 4
- Why is Microsoft.Extensions.Logging used instead of Serilog? HOT 1
- HealthCheck 3.1.3: Change services.AddHealthChecksUI() to services.AddHealthChecksUI().AddInMemoryStorage() HOT 3
- Info: Which is a good ReactJS panel to add to manange models and CRUD? HOT 1
- ActionResult not used HOT 3
- When Will be the update for .NET Core 5? HOT 3
- Runtime problem after updating AspNetCoreRateLimit to 4.0+ (with solution) HOT 1
- Is't possible to use SQLite or other db like MySQL? HOT 1
- How to use API Authentication with social network or Azure B2C?
- .NET 6 ApiBoilerPlate HOT 1
- Usinng this with angular 2+ HOT 1
- Add some detail on creating a service from the built API HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apiboilerplate.