Click here to Skip to main content
14,487,386 members

JavaScript

 
QuestionCan ms blazor be next level of client-side coding Pin
simpledeveloper23-Oct-19 11:42
Membersimpledeveloper23-Oct-19 11:42 
AnswerRe: Can ms blazor be next level of client-side coding Pin
jkirkerx24-Oct-19 12:00
professionaljkirkerx24-Oct-19 12:00 
GeneralRe: Can ms blazor be next level of client-side coding Pin
simpledeveloper24-Oct-19 13:22
Membersimpledeveloper24-Oct-19 13:22 
GeneralRe: Can ms blazor be next level of client-side coding Pin
jkirkerx25-Oct-19 10:53
professionaljkirkerx25-Oct-19 10:53 
AnswerRe: Can ms blazor be next level of client-side coding Pin
Pete O'Hanlon5-Nov-19 0:45
subeditorPete O'Hanlon5-Nov-19 0:45 
GeneralRe: Can ms blazor be next level of client-side coding Pin
simpledeveloper5-Nov-19 6:09
Membersimpledeveloper5-Nov-19 6:09 
GeneralRe: Can ms blazor be next level of client-side coding Pin
Pete O'Hanlon5-Nov-19 20:40
subeditorPete O'Hanlon5-Nov-19 20:40 
QuestionOpen base64 encoded pdf file using javascript Pin
Member 1286358021-Oct-19 4:16
MemberMember 1286358021-Oct-19 4:16 
AnswerRe: Open base64 encoded pdf file using javascript Pin
jkirkerx21-Oct-19 12:22
professionaljkirkerx21-Oct-19 12:22 
AnswerRe: Open base64 encoded pdf file using javascript Pin
Richard Deeming22-Oct-19 1:15
mveRichard Deeming22-Oct-19 1:15 
GeneralRe: Open base64 encoded pdf file using javascript Pin
jkirkerx24-Oct-19 12:18
professionaljkirkerx24-Oct-19 12:18 
AnswerRe: Open base64 encoded pdf file using javascript Pin
Parth Munjpara22-Oct-19 23:11
MemberParth Munjpara22-Oct-19 23:11 
QuestionWant to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
simpledeveloper17-Oct-19 13:27
Membersimpledeveloper17-Oct-19 13:27 
AnswerRe: Want to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
jkirkerx21-Oct-19 12:11
professionaljkirkerx21-Oct-19 12:11 
GeneralRe: Want to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
simpledeveloper21-Oct-19 13:16
Membersimpledeveloper21-Oct-19 13:16 
GeneralRe: Want to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
jkirkerx22-Oct-19 7:21
professionaljkirkerx22-Oct-19 7:21 
GeneralRe: Want to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
simpledeveloper22-Oct-19 8:56
Membersimpledeveloper22-Oct-19 8:56 
GeneralRe: Want to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
jkirkerx23-Oct-19 6:55
professionaljkirkerx23-Oct-19 6:55 
GeneralRe: Want to download a zip file that's returned as FileStreamResult only, I could able to download in-memory using byte array but Pin
simpledeveloper24-Oct-19 13:25
Membersimpledeveloper24-Oct-19 13:25 
Questionhas been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource Pin
simpledeveloper15-Oct-19 13:05
Membersimpledeveloper15-Oct-19 13:05 
AnswerRe: has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource Pin
jkirkerx15-Oct-19 13:54
professionaljkirkerx15-Oct-19 13:54 
AnswerRe: has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource Pin
F-ES Sitecore15-Oct-19 22:14
mveF-ES Sitecore15-Oct-19 22:14 
AnswerRe: has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource Pin
simpledeveloper16-Oct-19 7:10
Membersimpledeveloper16-Oct-19 7:10 
Hi, thank you I could able to resolve this issue by implementing CORS on my Web API, here is the Code change I did in my Web API. Thank you for all the support you Geeks have given me - thanks for the help
public void ConfigureServices(IServiceCollection services)
    {
        string configValue = Configuration.GetValue<string>("CORSComplianceDomains");
        string[] CORSComplianceDomains = configValue.Split("|,|");

        services.AddCors(options =>
        {
            options.AddDefaultPolicy(
                builder =>
                {

                    builder.WithOrigins("http://localhost:3000");
                });

            options.AddPolicy("AnotherPolicy",
                builder =>
                {
                    builder.WithOrigins(CORSComplianceDomains)
                                        .AllowAnyHeader()
                                        .AllowAnyMethod();
                });

        });

        services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);

        // In production, the React files will be served from this directory
        services.AddSpaStaticFiles(configuration =>
        {
            configuration.RootPath = "ClientApp/build";
        });
    }

And added the urls in the appsettings.json file so that any user can add the new urls without much sweating.
"CORSComplianceDomains": "http://localhost:3000|,|http://www.contoso.com"

Thank you very much - I put my answer here so that someone can get it - thanks for jumping in and helping please - I appreciated it - thank you so much.
QuestionTrying to download Zip files that's returned from Api React Pin
simpledeveloper14-Oct-19 9:00
Membersimpledeveloper14-Oct-19 9:00 
AnswerRe: Trying to download Zip files that's returned from Api React Pin
Richard Deeming14-Oct-19 9:38
mveRichard Deeming14-Oct-19 9:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.