Getting "Entity 'response_type' not defined" in ASP.NET web.config - web-config

Visual Studio is complaining about the following line in my web.config file:
<add key="foo" value="http://localhost?client_id=abc123&response_type=code&redirect_uri=google.com"/>
with the following errors:
"Entity 'response_type' not defined"
"Entity 'redirect_uri' not defined"
It says it expects a semi-colon where the equal signs are.
How can I escape this string so that it is treated as plain text? I tried using an # sign.

The & in the string is causing the error.
To my horror the & is within my SMTP settings for my email password in System.Net. I came here in the hope to learn how to define the string or the &.

Related

ERROR in There is a placeholder name mismatch with the translation provided

We use #angular/localize (Version 9.1.12) and have a problem with the placeholders in localized text.
E. g. we have:
$localize`:##form.hint:Some text ${name} in service.`;
or
$localize`:##form.hint:Some text ${name}:name: in service.`;
Because the localize text strings in typescript files aren't extracted we put these into a component template.
E. g.:
<p i18n="##form.hint">Some text {{ name }} in service.</p>
After execution of xi18n we get the messages.xlf (and messages.de.xlf) files which contain the following:
<trans-unit id="form.hint" datatype="html">
<source>Some text <x id="INTERPOLATION" equiv-text="{{ name }}"/> in service.</source>
<target state="new">Some text <x id="INTERPOLATION" equiv-text="{{ name }}"/> in service.</target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/translation/translation.component.html</context>
<context context-type="linenumber">207</context>
</context-group>
</trans-unit>
When we start the application with ng serve we get the following error:
ERROR in There is a placeholder name mismatch with the translation provided for the message "form.hint" ("Some text {$PH} in service.").
The translation contains a placeholder with name INTERPOLATION, which does not exist in the message.
The application does not work. After a restart the error does not occur and the application works. Nothing was changed before the restart.
We can work with a local restart but after each change of the messages.xlf files the error occurs again and we need two ci-builds on our build server to get a working installation on our test machine.
Any ideas what can be the cause of the placeholder mismatch?
For the current angular version (10.1.3) you need to opt in to extraction of translation tokens via ivy:
ng xi18n --ivy
The result will include texts from $localize.

How to resolve a "Metadata error: chr must be valid" error on Linux?

I am relatively new to the world of coding, so I am having trouble resolving an issue when running TranslocWrapper.pl tutorial_metadata.txt preprocess/ results/ --threads 2. I am trying to run the HTGTS Pipeline according to this GitHub project. This is the full error:
. Library Genome Chr Start End Strand
1 RAG1A_SRep2 hg19 chr11 36594878 36595030 -
Metadata error: chr must be valid at /home/micah/transloc_pipeline/bin/TranslocWrapper.pl line 285.
main::check_validity_of_metadata('HASH(0x2903ac8)') called at /home/micah/transloc_pipeline/bin/TranslocWrapper.pl line 248
main::read_in_meta_file() called at /home/micah/transloc_pipeline/bin/TranslocWrapper.pl line 90
I have already double-checked the successful installation of the Software Dependencies, so everything should be all good, but I am having trouble interpreting the "Metadata error: chr must be valid at ..." line. If it helps, these are the specific lines that are being called in the error:
TranslocWrapper.pl line 285:
croak "Metadata error: chr must be valid" unless grep { $_ eq $expt->{chr} } #chrlist;
TranslocWrapper.pl line 248:
check_validity_of_metadata($expt);
TranslocWrapper.pl line 90:
read_in_meta_file;
Thanks in advance for the help!
So the error is saying that one of the sequence characters in the metadata file is not present in the sequence's assembly file.
Given that this is the provided example you should assume that the data is correct and your invocation is faulty.
Have you done the TranslocPreprocess.pl preprocessing steps?
If you have try looking at the first line of the metadata file, identify the assembly entry. Ensure that the assembly file exists and that it contains the required sequence.
One common problem with this kind of code is the case of the filenames. The examples are designed to be run in Linux where filename case matters. Windows likes to pretend that case doesn't matter, this can cause problems. If you are running this code from Microsoft Windows or extracted any of the archives from within Windows this is a likely cause of the error.

when scaffoling ef7 i keep getting Error: Illegal character '/' (Unicode hexadecimal 002F). on command line

I am not sure why I keep getting this Error: Illegal character '/' (Unicode hexadecimal 002F) when reversing a database with EF 7 on the command line. Can someone tell me where in the string is shown below on the command line that is causing this. What is weird if I just type dnx ef I get the same error error.
C:\Users\Owner\Desktop\SpaceRadar\src\SpaceRadar.EntityFramework>dnx ef
dbcontext scaffold "data source=database_server;initial
catalog=DemoDb;persist security info=True;user id=user;password=*****"
EntityFramework.MicrosoftSqlServer -a -c "DataStore" -o Model
Error: Illegal character '/' (Unicode hexadecimal 002F)
This could be because there are comments in the project.json file, which are not supported by the JSON parser.

Start glassfish server on different port

I have created a new domain ac and defined a different port in domain.xml i.e. 11305. But when I try to start the domain it gives me following exception:
com.sun.enterprise.universal.xml.MiniXmlParserException: "Xml Parser Error: javax.xml.stream.XMLStreamException: ParseError at
[row,col]:[253,34]
Message: Open quote is expected for attribute "{1}" associated with an element type "port".
Here is the command:
./asadmin start-domain ac
Here is the part of the domain.xml file
<network-listeners>
<network-listener port=“11305” protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
<network-listener port="33389" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
<network-listener port="33356" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
</network-listeners>
Where am I going wrong?
The xml config got malformed. Check if the port value is quoted and check if your quote is the right symbol (try copying quotes from other places in the xml)
Update: First and second quotes are non-standard in your excerpt of the domain.xml file, 3rd line. Compare the quotes around 11305 and the quotes around http-listener-1. They are different. The quotes around http-listener-1 are proper and you should use those.

pydev: remote debug linux server from windows

I followed http://pydev.org/manual_adv_remote_debugger.html and configured something like this
PATHS_FROM_ECLIPSE_TO_PYTHON = [('W:',
r'/path/to/app'),
]
The translation works but has one little problem: the backslashes are not translated.
I am getting the following message:
pydev debugger: warning: trying to add breakpoint to file that does not exist:
/path/to/app\subpath\foo\bar.py (will have no effect)
How can I configure pydevd_file.utils.py so the backslashes get translated?
I found a solution.
I set
eclipse_sep = '\\'
python_sep = '/'
in pydevd_file_utils.py