Greetings,
I know we've been trying to take care of this via email but as my emails are not getting through, I thought I post here. I really need help with this. I can send TeamViewer login data. I just need some direction as to where since, as I said, my emails are not getting through.
Access to XMLHttpRequest at 'http://karakthemad//AbpUserConfiguration/GetAll?d=1640727457038' from origin 'http://karakthemad:4500' has been blocked by CORS policy: Request header field abp.tenantid is not allowed by Access-Control-Allow-Headers in preflight response.
I've tried various Access-Control settings This is my current setup and still does not work: And I would prefer to not have a wild card for the origin.
<customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Control-Allow-Headers" value="Origin, Content-Type, X-Auth-Token" /> <add name="Access-Control-Allow-Methods" value="HEAD, GET, POST, PUT, DELETE, PATCH, OPTIONS" /> </customHeaders>
From appsettings.production.json: "App": { "ServerRootAddress": "http://KarakTheMad:80/", "ClientRootAddress": "http://KarakTheMad:4500/", "CorsOrigins": "http://KarakTheMad/" }
I tried removing port 80 in the CorsOrigin as suggested in an older post. No luck.
The .NET Core app and the Angular app are in two separate projects and thus two separate IIS sites.
What do you need me to get setup for you when you do the TeamViewer session so I can have folders open etc. so you don't have to hunt around for them.
Thanks once again!
5 Answer(s)
-
0
Just so I this posted here and not lost in the email void, I'm also done the following:
1.) I've installed IIS CORS 2.) I've added some of cors xml attributes to the web.config: <cors enabled="true" failUnlistedOrigins="true"> <add origin="*" /> <add origin="http://karakthemad:4500" allowCredentials="true" maxAge="120"> <allowHeaders allowAllRequestedHeaders="true"> <add header="header1" /> <add header="header2" /> <add header="abp.tenantid" /> </allowHeaders> <allowMethods> <add method="GET" /> <add method="HEAD" /> <add method="POST" /> <add method="PUT" /> <add method="DELETE" /> </allowMethods> <exposeHeaders> <add header="header1" /> <add header="header2" /> </exposeHeaders> </add> </cors>
At his point I'm getting: GET http://karakthemad/Error?statusCode=404 500 (Internal Server Error) scripts.9470d603b68735921d8d.js:1 WARN: scripts.9470d603b68735921d8d.js:1 Could not find localization source: AbpWeb
I tried adding part of the web.config from the Angular UI to the bottom of the existing web.config: <staticContent> <remove fileExtension=".json" /> <mimeMap fileExtension=".json" mimeType="application/json" /> <mimeMap fileExtension="woff" mimeType="application/font-woff" /> <mimeMap fileExtension="woff2" mimeType="application/font-woff" /> </staticContent> <!-- IIS URL Rewrite for Angular routes --> <rewrite> <rules> <rule name="Angular Routes" stopProcessing="true"> <match url=".*" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> <add input="{REQUEST_URI}" pattern="^/(api)" negate="true" /> </conditions> <action type="Rewrite" url="/" /> </rule> </rules> </rewrite> When I do get an for index.html <span class="colour" style="color: rgb(34, 34, 34);">I get a "too many rewrites error".</span> Anyway, I've emailed all of this plus my TeamViewer info a little while ago.
-
0
Hi @KarakTheWise
We have sent you an email about this. Could you please check;
- Try to open the URL below in a new browser tab and see if it works.
- If it works or not, go to your deployed server side app's root folder and open App_Data/Logs folder and see error logs in Logs.txt file and share it with us.
-
0
-
0
I sent an email with the TeamView information just now. Thanks again!
-
0
Hi @KarakTheWise
Thanks, replied to your email. I assume the problem is, your angular app's configuration is wrong. We will provide a correct configuration according to your reply.