LINQPad 4 Error in Downloading More Samples - linqpad

I am having this error when I try to download LINQPad sample libraries: Error while unpacking sample queries: C:\Documents and Settings[user]\Local Settings\Temp\LINQPad\TempSampleQueries849247.zip is not a valid zip file.
I use LinqPad 4 (installed version). The weird thing is I also have LINQPad 4 (licensed standalone executable) at home and I didn't encounter any problems in downloading. Do I need to have license to be able to download the sample files?
Edit:
I am also having problems in activating my LINQPad. The error says: Unable to contact licensing server: The remote server returned an error: (407) Proxy Authentication Required. I pretty much sure I'm not using any proxies. Please help! Thanks.

Are you certain you're not going through a proxy? I don't see any other way you could be getting a 407 error. Entering the proxy username/password into LINQPad's proxy dialog (Edit | Preferences | Updates) should fix it.
If you're still unable to proceed, you can perform an offline activation here and download the sample libraries via a web browser here. After downloading a samples zip file, click 'Download more samples' and type in the local file path to import it.

Simple solution to prevent the proxy 407 authentication needed error when licensing or updating Linqpad: Add the following to Linqpad's config file
<system.net>
<defaultProxy useDefaultCredentials="true" />
</system.net>

Related

Publish .NET Code application to Arvixe Host

I have a ASP.NET Core with Blazor website and I want to deploy it to Arvixe host. The website is very simple and contains only UI elements no database required. I published the website to a local file system and uploaded it using FTP to the Plesk.
When I am visiting the website, I receive this error:
500 - Internal server error. There is a problem with the resource you
are looking for, and it cannot be displayed.
I have tried to run it on the IIS and I received more details:
Configuration The configuration file cannot be read due to
insufficient permissions.
I tried to add IIS_IUSRS to the group and users for web.config but I am not able to find it because I am using a windows 10 connected to active directory.
Besides, I still don't know how to solve this problem at Arvixe. Does anyone know tips might help?
500 internal error is generic issue. Please kindly check the error message on the server and paste it here. Make sure that your provider has installed .net core bundled on their server and here are tutorial about publsih .net core using plesk https://windowswebhostingreview.com/how-to-publish-using-web-deploy-with-plesk-control-panel/. It should be working fine.
You need to give Full Trust permission (Read-Write-Execute) to your application folder and also to Application Pool and also check if the Runtime version supported by Arvixe matches with your Asp.net Core version.
Also enable the logs in web.config file by setting stdoutLogEnabled="true" to get detailed error so that you can investigate more about the error.

Could not GET gradle-3.1.3.pom android studio

I have problem with android studio, I was working with it after update to 3.1.3 i give below error:
Could not GET
'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.3/gradle-3.1.3.pom'.
Received status code 400 from server: Bad Request
I could download this file manually but android studio can't.
I test several way and use proxy but I can't get answer.
At last today i could solve problem, this error related to your connection i could solve this with proxy setting. google filter our Iran IP and could detect some proxy and you must use good proxy to pass it.
I'm getting the thing, but with a 407 error.
Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.3/gradle-3.1.3.pom'. Received status code 407 from server: Proxy Authentication Required
"I could download this file manually but android studio can't.
I test several way and use proxy but I can't get answer."
Same here.

ASP.NET Core hosting - 500 internal server error

I am trying to publish as ASP.NET Core project with a hosting provider that supports ASP.NET Core. I am getting 500 Internal Server Error which I believe is very common. So I searched through the internet and various forums and then I checked the processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" in web.config and they look to be correctly converted with processPath="dotnet" and arguments=".\MyApplication.dll".
I also checked the connection string and it points to production DB server that's working. I confirmed the DB connection by changing the connection string to production DB and running project local. It works and I get the production DB access.
I also tried to get the error info by using the below in my Startup.cs (irrespective of env):
app.UseDeveloperExceptionPage();
app.UseDatabaseErrorPage();
app.UseBrowserLink();
I have also enabled stdoutLog in web.config, but I don't see that folder either:
stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout"
I also tried to change applicationUrl and launchUrl in launchSettings.json to my prod Url, but that didn't work as well.
So, the 500 Internal Server Error refuses to go away, and I still don't have a useful error message. The page just says:
Oops.
500 Internal Server Error
An error occurred while starting the application.
I would really appreciate if someone could help me here.
I have also enabled stdoutLog in web.config as but I don't see that folder either:
stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout"
There is one trick here - you must create both folders logs and stdout manually - then and only then IIS will create log file inside logs folder (not stdout as you could expect) - don't ask me why, because I don't know why ;)
Oops. 500 Internal Server Error An error occurred while starting the application.
Usually, means problems with a configuration in Startup.cs - the most common problems include an issue with DB itself, an issue with migrations (if you are using Code First approach), problems with appsettings.js, problems with Social Logins credentials (like missing SecretKey)...
Please refer to log file in .\logs\stdout - this is the quickest way to find details about the problem :)
app.UseDeveloperExceptionPage();
app.UseDatabaseErrorPage();
Those will work after your WebApp fully started, but not while starting the application.
in web.config file change modules="AspNetCoreModuleV2" to modules="AspNetCoreModule"
and watch this video
https://www.youtube.com/watch?v=clCR3k6kkD8
Thanks to Lukasz for his comments. I was able to see the log and it stated that "ClientId option must be provided". The problem was with the UserSecrets. Since secrets.json is only available in Development, there were no secrets found in Production. Once I had the secrets in my appSettings.json, it worked fine.
Moreover, To replicate this in Local environment, just go to Project properties and change the environment variable ASPNETCORE_ENVIRONMENT to 'Production' and run in local. This will replicate the 500 Internal Server Error in local and you'll get the error message.
Also, ensure that the ASP.NET Core Windows Server Hosting bundle is installed. THis creates a reverse proxy between IIS and the Kestral server.
More Info:
https://learn.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x#tabpanel_tfsY37MhAQ_aspnetcore2x
I would like to add some more info to #Lukasz Makowej answer.
I found out the reason why to have to create the folder, in microsoft documentation it is said that:
stdoutLogFile - Optional string attribute.
".....Any folders provided in the path must exist in order for the module to create the log file...."
So you have to create it yourself :)
Check it out here:
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/aspnet-core-module?view=aspnetcore-2.0
I also must said that in my case I had to validate that the web-site had the permissions to access to the "log" folder.
Make sure your web.config is good. I've been stomped more than once by a syntactically good web.config that referred to a module (Rewrite) that wasn't on the server. No error messages anywhere, other than the 500 response error.
Std log wasn't working for me, I had to uninstall all .ENT Core runtime / SDK versions from the server and my local to install the latest one and it worked after publishing everything again from scratch.
Another thing that helped was binding the IIS app to port 5000 without any dns so it actually showed me errors on http://localhost:5000
Encountered this issue yesterday, we also had no logging, no eventlog message whatsoever.
Then we checked the site's authentication settings via the IIS-manager to double-check the settings. And pop suddenly a popup with an error message 'Error on line XXXX'.
Turned out the configuration section was locked in the website's config at server-level.
So try unlocking the relevant IIS configuration settings at server level, as follows:
Open IIS Manager
Select the server in the Connections pane
Open Configuration Editor in the main pane
In the Sections drop down, select the section to unlock, e.g. system.webServer => security => authentication
Click Unlock Attribute in the right pane
Repeat for any other settings which you need to unlock
Restart IIS (optional) - Select the server in the Connections pane, click Restart in the Actions pane

Handshake alert: unrecognized_name error

I am using Charles 3.7 to debug SSL connections. I was able to view most of the HTTPS connections, however there is 1 or 2 sites that returned "SSLProtocol: handshake alert: unrecognized_name" when I try to debug it, and I was unable to load the website with Charles on. I am able to do so using Fiddler. Any ideas on how to resolve this issue? Thanks.
I came across this when using the latest beta Charles 3.10b9 on 10.10. We fixed by using a similar method to Shade's answer:
I opened info.plist in Xcode and did the following:
Under the JVMOptions (as oppose to VMOptions) key add the string:
-Djsse.enableSNIExtension=false
Looks like this has more to do with a security improvement from Java 1.7 and server configuration than it does Charles. Can you confirm which JRM Charles is using? help -> about java
Here's an article about the same error message but after upgrading to Java 1.7:
http://www.pressingquestion.com/2030237/Ssl-Handshake-Alert-Unrecognized_name-Error-Since-Upgrade-To-Java-170
Do you need to use Charles for those sites throwing the error? You can disable SSL Proxying per site if not.
Add
-Djsse.enableSNIExtension=false to the info.plist in the Contents folder for the Charles application.
In:
<key>VMOptions</key>
<string>-Xmx512m -Djsse.enableSNIExtension=false</string>
Try using command line from project's path:
mvn clean install -Djsse.enableSNIExtension=false

OData / WCF Data Service - HTTP 500 Error

I have created an OData/WCF service using Visual Studio 2010 on Windows XP SP3 with all current patches installed.
When I click on "view in browser", the service opens and I see the 3 tables from my EF model. However, when I add a table name ("Commands" in this case) to the end of the query string, rather than seeing the data from the table, I get an HTTP 500 error.
(This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.).
I have not only followed the examples from 2 sites, but have also tried running the sample application that the blog poster sent me (that works on his machine), and still am not having any luck.
The blog post is at Exposing OData from an Entity Framework Model
Does anyone have an idea why this is occurring and how to resolve it?
Here is the output of the "View in Browser":
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
- <service xml:base="http://localhost:1883/VistaDBCommandService.svc/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app">
- <workspace>
<atom:title>Default</atom:title>
- <collection href="Commands">
<atom:title>Commands</atom:title>
</collection>
- <collection href="Databases">
<atom:title>Databases</atom:title>
</collection>
- <collection href="Statuses">
<atom:title>Statuses</atom:title>
</collection>
</workspace>
</service>
Update:
In an effort to get this working, I have:
Removed and re-installed IIS
Ran the %WINDIR%\Microsoft.Net\Framework\v4.0.30319\aspnet_regiis –i –enable command
Ran the %WINDIR%\Microsoft.Net\Framework\v4.0.30319\ServiceModelReg.exe -r command.
Created a new solution and followed the instructions very carefully to assure that I
didn't mess anything up.
After all of this, I am still getting the same HTTP 500 error, with no entries of any kind in the Event Viewer.
Any other ideas?
I figured out that my problem was an issue with opening the database. The way I figured it out was to add the following to the servicename.svc.cs file in the InitializeService method:
config.UseVerboseErrors=true;
Thanks to all who tried to help.
Eric
config.UseVerboseErrors=true; helped me in finding out the problem. The problem was I was using windows authentication for database connection. After changing to SQL Server Authentication everything worked fine.
Please try these debugging tips to see the actual error which happened:
Link
500 always means there was an unhandled exception in the service. Go look in the windows event log to see what that error was.
Received similar output with VS2013:
Resolved by upgrading the Entity Framework.
See answer https://stackoverflow.com/a/21028123/2116188.
You can also activate Failed Request Tracing for your Web Application in IIS
then you will get detailled trace execution in Xml files from IIS when a 500 error occurs
There is a good article here explaining how to setup Failed Request Tracing in IIS :
Using Failed Request Tracing to Trace Rewrite Rules
HTH
Cédric
If you are using SQL Server Compact data file (Like NorthWind.sdf) you need to give write file permission to IUSRS group.
Ex: If you are using NorthWind.sdf in DataDirectory i.e. YourWeb/App_Data then you need to give write permissions to _IUSRS group from IIS Console or from Windows Explorer.